Class SimpleObjectHandler

java.lang.Object
com.github.mustachejava.reflect.BaseObjectHandler
com.github.mustachejava.reflect.SimpleObjectHandler
All Implemented Interfaces:
ObjectHandler

public class SimpleObjectHandler extends BaseObjectHandler
  • Field Details

  • Constructor Details

    • SimpleObjectHandler

      public SimpleObjectHandler()
  • Method Details

    • createBinding

      public Binding createBinding(String name, TemplateContext tc, Code code)
      Description copied from interface: ObjectHandler
      Each call site has its own binding to allow for fine grained caching without a separate parallel hierarchy of objects.
      Specified by:
      createBinding in interface ObjectHandler
      Specified by:
      createBinding in class BaseObjectHandler
      Parameters:
      name - the name that we bound
      tc - the textual context of the binding site
      code - the code that was bound
      Returns:
      the binding
    • find

      public Wrapper find(String name, List<Object> scopes)
      Description copied from interface: ObjectHandler
      Find a value named "name" in the array of scopes in reverse order.
      Parameters:
      name - the variable name
      scopes - the ordered list of scopes
      Returns:
      a wrapper that can be used to extract a value
    • lookup

      private AccessibleObject lookup(Class sClass, String name)
    • areMethodsAccessible

      protected boolean areMethodsAccessible(Map<?,?> map)