Pass the context instance itself instead of its class.

In GWT we can't use Class.isAssignableFrom. We need the original instance so
that we can do (ctx instanceof Map<?,?>).
This commit is contained in:
Michael Bayne
2011-10-29 15:29:18 -07:00
parent 69826a707e
commit f6c6f4916c
4 changed files with 11 additions and 8 deletions
@@ -144,8 +144,10 @@ public class Mustache
* not a collection. */
Iterator<?> toIterator (final Object value);
/** Creates a fetcher for a so-named variable on instances of the given class. */
VariableFetcher createFetcher (Class<?> cclass, String name);
/** 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 which
* {@code octx.getClass().equals(nctx.getClass()}. */
VariableFetcher createFetcher (Object ctx, String name);
}
/**