Class DefaultCollector
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 BasicCollector
BasicCollector.ArrayHelper -
Field Summary
Fields -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionprivate voidcreateFetcher(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(Map)called on a standardMapimplementation or something likeConcurrentHashMap.protected Fieldprotected MethodgetIfaceMethod(Class<?> clazz, String name) protected Methodprotected MethodgetMethodOn(Class<?> clazz, String name) private MethodMethods inherited from class 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.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- Overrides:
createFetcherin classBasicCollector
-
createFetcherCache
Description copied from class:BasicCollectorThis should return a thread-safe map, eitherCollections.synchronizedMap(Map)called on a standardMapimplementation or something likeConcurrentHashMap.- Specified by:
createFetcherCachein interfaceMustache.Collector- Specified by:
createFetcherCachein classBasicCollector
-
getMethod
-
getIfaceMethod
-
addIfaces
-
getMethodOn
-
makeAccessible
-
getField
-