Class MapResolver
- java.lang.Object
-
- io.pebbletemplates.pebble.attributes.MapResolver
-
- All Implemented Interfaces:
AttributeResolver
class MapResolver extends java.lang.Object implements AttributeResolver
-
-
Field Summary
Fields Modifier and Type Field Description (package private) static MapResolverINSTANCE
-
Constructor Summary
Constructors Modifier Constructor Description privateMapResolver()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description private java.lang.Objectcast(java.lang.Number number, java.lang.Class<?> desiredType, java.lang.String filename, int lineNumber)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 MapResolver 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
-
cast
private java.lang.Object cast(java.lang.Number number, java.lang.Class<?> desiredType, java.lang.String filename, int lineNumber)
-
-