Class DefaultAttributeResolver
java.lang.Object
io.pebbletemplates.pebble.attributes.DefaultAttributeResolver
- All Implemented Interfaces:
AttributeResolver
-
Field Summary
Fields -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionprivate Class<?>[]getArgumentTypes(Object[] argumentValues) private ObjectinvokeMember(Object object, Member member, Object[] argumentValues, String filename, int lineNumber) Invoke the "Member" that was found via reflection.resolve(Object instance, Object attributeNameValue, Object[] argumentValues, ArgumentsNode args, EvaluationContextImpl context, String filename, int lineNumber) Attempts to resolve an attribute of the given instance.
-
Field Details
-
memberCacheUtils
-
-
Constructor Details
-
DefaultAttributeResolver
public DefaultAttributeResolver()
-
-
Method Details
-
resolve
public ResolvedAttribute resolve(Object instance, Object attributeNameValue, Object[] argumentValues, ArgumentsNode args, EvaluationContextImpl context, String filename, int lineNumber) Description copied from interface:AttributeResolverAttempts to resolve an attribute of the given instance. If this method returnsnull, Pebble asks the next attribute resolver in the list.- Specified by:
resolvein interfaceAttributeResolver- Parameters:
instance- The object which is being accessedattributeNameValue- The name of the attribute to resolveargumentValues- fully evaluated positional argumentsargs- The argumentscontext- The evaluation contextfilename- Filename of the templatelineNumber- the line number on which the expression is defined on.- Returns:
- a
ResolvedAttributewrapping the attribute value, ornullif the attribute could not be resolved
-
getArgumentTypes
-
invokeMember
private Object invokeMember(Object object, Member member, Object[] argumentValues, String filename, int lineNumber) Invoke the "Member" that was found via reflection.
-