java.lang.Object
com.samskivert.mustache.BasicCollector
com.samskivert.mustache.DefaultCollector
- All Implemented Interfaces:
Mustache.Collector
The default collector used by JMustache.
-
Nested Class Summary
Nested classes/interfaces inherited from class com.samskivert.mustache.BasicCollector
BasicCollector.ArrayHelper
-
Field Summary
FieldsFields inherited from class com.samskivert.mustache.BasicCollector
BOOLEAN_ARRAY_HELPER, BYTE_ARRAY_HELPER, CHAR_ARRAY_HELPER, CUSTOM_FETCHER, DOUBLE_ARRAY_HELPER, FLOAT_ARRAY_HELPER, INT_ARRAY_HELPER, ITER_FETCHER, LIST_FETCHER, LONG_ARRAY_HELPER, MAP_FETCHER, OBJECT_ARRAY_HELPER, SHORT_ARRAY_HELPER
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionprivate void
createFetcher
(Object ctx, String name) Creates a fetcher for a so-named variable in the supplied context object, which will never be null.<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
.protected Field
protected Method
getIfaceMethod
(Class<?> clazz, String name) protected Method
protected Method
getMethodOn
(Class<?> clazz, String name) private Method
Methods inherited from class com.samskivert.mustache.BasicCollector
arrayHelper, toIterator
-
Field Details
-
_allowAccessCoercion
private final boolean _allowAccessCoercion
-
-
Constructor Details
-
DefaultCollector
public DefaultCollector() -
DefaultCollector
public DefaultCollector(boolean allowAccessCoercion)
-
-
Method Details
-
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
- Overrides:
createFetcher
in classBasicCollector
-
createFetcherCache
Description copied from class:BasicCollector
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
- Specified by:
createFetcherCache
in classBasicCollector
-
getMethod
-
getIfaceMethod
-
addIfaces
-
getMethodOn
-
makeAccessible
-
getField
-