- java.lang.Object
-
- com.samskivert.mustache.BasicCollector
-
- All Implemented Interfaces:
Mustache.Collector
- Direct Known Subclasses:
DefaultCollector
public abstract class BasicCollector extends Object implements Mustache.Collector
A collector that does not use reflection and can be used with GWT.
-
-
Constructor Summary
Constructors Constructor Description BasicCollector()
-
Method Summary
All Methods Instance Methods Abstract 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.abstract <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.Iterator<?>toIterator(Object value)Returns an iterator that can iterate over the supplied value, or null if the value is not a collection.
-
-
-
Method Detail
-
toIterator
public Iterator<?> toIterator(Object value)
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
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
-
createFetcherCache
public abstract <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.- Specified by:
createFetcherCachein interfaceMustache.Collector
-
-