Interface Mustache.CustomContext

  • Enclosing class:
    Mustache

    public static interface Mustache.CustomContext
    Provides a means to implement custom logic for variable lookup. If a context object implements this interface, its get method will be used to look up variables instead of the usual methods. This is simpler than having a context implement Map which would require that it also support the Map.entrySet() method for iteration. A CustomContext object cannot be used for a list section.
    • Method Summary

      All Methods Instance Methods Abstract Methods 
      Modifier and Type Method Description
      java.lang.Object get​(java.lang.String name)
      Fetches the value of a variable named name.
    • Method Detail

      • get

        java.lang.Object get​(java.lang.String name)
                      throws java.lang.Exception
        Fetches the value of a variable named name.
        Throws:
        java.lang.Exception