Class MacroResolver
- java.lang.Object
-
- io.pebbletemplates.pebble.attributes.MacroResolver
-
- All Implemented Interfaces:
AttributeResolver
class MacroResolver extends java.lang.Object implements AttributeResolver
-
-
Field Summary
Fields Modifier and Type Field Description (package private) static MacroResolverINSTANCE
-
Constructor Summary
Constructors Modifier Constructor Description privateMacroResolver()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description ResolvedAttributeresolve(java.lang.Object instance, java.lang.Object attributeNameValue, java.lang.Object[] argumentValues, ArgumentsNode args, EvaluationContextImpl context, java.lang.String filename, int lineNumber)Attempts to resolve an attribute of the given instance.
-
-
-
Field Detail
-
INSTANCE
static final MacroResolver INSTANCE
-
-
Method Detail
-
resolve
public ResolvedAttribute resolve(java.lang.Object instance, java.lang.Object attributeNameValue, java.lang.Object[] argumentValues, ArgumentsNode args, EvaluationContextImpl context, java.lang.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
-
-