Class BasicCollector
java.lang.Object
com.samskivert.mustache.BasicCollector
- All Implemented Interfaces:
Mustache.Collector
- Direct Known Subclasses:
DefaultCollector
A collector that does not use reflection and can be used with GWT.
-
Nested Class Summary
Nested Classes -
Field Summary
FieldsModifier and TypeFieldDescriptionprotected static final BasicCollector.ArrayHelperprotected static final BasicCollector.ArrayHelperprotected static final BasicCollector.ArrayHelperprotected static final Mustache.VariableFetcherprotected static final BasicCollector.ArrayHelperprotected static final BasicCollector.ArrayHelperprotected static final BasicCollector.ArrayHelperprotected static final Mustache.VariableFetcherprotected static final Mustache.VariableFetcherprotected static final BasicCollector.ArrayHelperprotected static final Mustache.VariableFetcherprotected static final BasicCollector.ArrayHelperprotected static final BasicCollector.ArrayHelper -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionprotected static BasicCollector.ArrayHelperarrayHelper(Object ctx) createFetcher(Object ctx, String name) Creates a fetcher for a so-named variable in the supplied context object, which will never be null.abstract <K,V> Map <K, V> This should return a thread-safe map, eitherCollections.synchronizedMap(Map)called on a standardMapimplementation or something likeConcurrentHashMap.Iterator<?> toIterator(Object value) Returns an iterator that can iterate over the supplied value, or null if the value is not a collection.
-
Field Details
-
CUSTOM_FETCHER
-
MAP_FETCHER
-
LIST_FETCHER
-
ITER_FETCHER
-
OBJECT_ARRAY_HELPER
-
BOOLEAN_ARRAY_HELPER
-
BYTE_ARRAY_HELPER
-
CHAR_ARRAY_HELPER
-
SHORT_ARRAY_HELPER
-
INT_ARRAY_HELPER
-
LONG_ARRAY_HELPER
-
FLOAT_ARRAY_HELPER
-
DOUBLE_ARRAY_HELPER
-
-
Constructor Details
-
BasicCollector
public BasicCollector()
-
-
Method Details
-
toIterator
Description copied from interface:Mustache.CollectorReturns an iterator that can iterate over the supplied value, or null if the value is not a collection.- Specified by:
toIteratorin interfaceMustache.Collector
-
createFetcher
Description copied from interface:Mustache.CollectorCreates a fetcher for a so-named variable in the supplied context object, which will never be null. The fetcher will be cached and reused for future contexts for whichoctx.getClass().equals(nctx.getClass().- Specified by:
createFetcherin interfaceMustache.Collector
-
createFetcherCache
This should return a thread-safe map, eitherCollections.synchronizedMap(Map)called on a standardMapimplementation or something likeConcurrentHashMap.- Specified by:
createFetcherCachein interfaceMustache.Collector
-
arrayHelper
-