Interface AttributeResolver

All Known Implementing Classes:
DefaultAttributeResolver

public interface AttributeResolver
Resolves instance attributes
  • Method Details

    • resolve

      ResolvedAttribute resolve(Object instance, Object attributeNameValue, Object[] argumentValues, ArgumentsNode args, EvaluationContextImpl context, String filename, int lineNumber)
      Attempts to resolve an attribute of the given instance. If this method returns null, Pebble asks the next attribute resolver in the list.
      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