- java.lang.Object
-
- com.samskivert.mustache.BasicCollector
-
- com.samskivert.mustache.DefaultCollector
-
- All Implemented Interfaces:
Mustache.Collector
public class DefaultCollector extends BasicCollector
The default collector used by JMustache.
-
-
Constructor Summary
Constructors Constructor Description DefaultCollector()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description Mustache.VariableFetchercreateFetcher(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>createFetcherCache()This should return a thread-safe map, eitherCollections.synchronizedMap(java.util.Map<K, V>)called on a standardMapimplementation or something likeConcurrentHashMap.-
Methods inherited from class com.samskivert.mustache.BasicCollector
toIterator
-
-
-
-
Method Detail
-
createFetcher
public Mustache.VariableFetcher createFetcher(Object ctx, String name)
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
public <K,V> Map<K,V> createFetcherCache()
Description copied from class:BasicCollectorThis should return a thread-safe map, eitherCollections.synchronizedMap(java.util.Map<K, V>)called on a standardMapimplementation or something likeConcurrentHashMap.- Specified by:
createFetcherCachein interfaceMustache.Collector- Specified by:
createFetcherCachein classBasicCollector
-
-