Class GuardedBinding
java.lang.Object
com.github.mustachejava.reflect.GuardedBinding
- All Implemented Interfaces:
Binding
-
Field Summary
FieldsModifier and TypeFieldDescriptionprivate final Codeprivate static booleanprivate static final Wrapper[]private static Loggerprivate final Stringprivate final ObjectHandlerThe chances of a new guard every time is very low.private Wrapper[]private final TemplateContext -
Constructor Summary
ConstructorsConstructorDescriptionGuardedBinding(ObjectHandler oh, String name, TemplateContext tc, Code code) -
Method Summary
Modifier and TypeMethodDescriptionprivate ObjectcreateAndGet(List<Object> scopes) Retrieve the first value in the stacks of scopes that matches the give name.protected WrappergetWrapper(String name, List<Object> scopes) static voidlogWarning(String warning, String name, List<Object> scopes, TemplateContext tc)
-
Field Details
-
EMPTY_WRAPPERS
-
logger
-
debug
private static boolean debug -
oh
-
tc
-
name
-
code
-
previousSet
-
prevWrappers
-
-
Constructor Details
-
GuardedBinding
-
-
Method Details
-
get
Retrieve the first value in the stacks of scopes that matches the give name. The method wrappers are cached and guarded against the type or number of scopes changing. Methods will be found using the object handler, called here with another lookup on a guard failure and finally coerced to a final value based on the ObjectHandler you provide. -
createAndGet
-
getWrapper
-
logWarning
-