Class ListResolver

    • Field Summary

      Fields 
      Modifier and Type Field Description
      (package private) static ListResolver INSTANCE  
    • Constructor Summary

      Constructors 
      Modifier Constructor Description
      private ListResolver()  
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      ResolvedAttribute resolve​(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.
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Constructor Detail

      • ListResolver

        private ListResolver()
    • 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: 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