Class DefaultAttributeResolver

java.lang.Object
io.pebbletemplates.pebble.attributes.DefaultAttributeResolver
All Implemented Interfaces:
AttributeResolver

public class DefaultAttributeResolver extends Object implements AttributeResolver
  • 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: AttributeResolver
      Attempts to resolve an attribute of the given instance. If this method returns null, Pebble asks the next attribute resolver in the list.
      Specified by:
      resolve in interface AttributeResolver
      Parameters:
      instance - The object which is being accessed
      attributeNameValue - The name of the attribute to resolve
      argumentValues - fully evaluated positional arguments
      args - The arguments
      context - The evaluation context
      filename - Filename of the template
      lineNumber - the line number on which the expression is defined on.
      Returns:
      a ResolvedAttribute wrapping the attribute value, or null if the attribute could not be resolved