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.ArrayHelper
protected static final BasicCollector.ArrayHelper
protected static final BasicCollector.ArrayHelper
protected static final Mustache.VariableFetcher
protected static final BasicCollector.ArrayHelper
protected static final BasicCollector.ArrayHelper
protected static final BasicCollector.ArrayHelper
protected static final Mustache.VariableFetcher
protected static final Mustache.VariableFetcher
protected static final BasicCollector.ArrayHelper
protected static final Mustache.VariableFetcher
protected static final BasicCollector.ArrayHelper
protected static final BasicCollector.ArrayHelper
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionprotected static BasicCollector.ArrayHelper
arrayHelper
(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(java.util.Map<K, V>)
called on a standardMap
implementation 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.Collector
Returns an iterator that can iterate over the supplied value, or null if the value is not a collection.- Specified by:
toIterator
in interfaceMustache.Collector
-
createFetcher
Description copied from interface:Mustache.Collector
Creates 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:
createFetcher
in interfaceMustache.Collector
-
createFetcherCache
This should return a thread-safe map, eitherCollections.synchronizedMap(java.util.Map<K, V>)
called on a standardMap
implementation or something likeConcurrentHashMap
.- Specified by:
createFetcherCache
in interfaceMustache.Collector
-
arrayHelper
-