Class MethodHelper

    • Constructor Summary

      Constructors 
      Constructor Description
      MethodHelper​(java.lang.reflect.Method method, java.lang.Object source)
      Creates a new MethodHelper.
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      java.lang.Object apply​(java.lang.Object context, Options options)
      Apply the helper to the context.
      • Methods inherited from class java.lang.Object

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

      • MethodHelper

        public MethodHelper​(java.lang.reflect.Method method,
                            java.lang.Object source)
        Creates a new MethodHelper.
        Parameters:
        method - The method to invoke. Required.
        source - The source or instance object. Might be null.
    • Method Detail

      • apply

        public java.lang.Object apply​(java.lang.Object context,
                                      Options options)
                               throws java.io.IOException
        Description copied from interface: Helper
        Apply the helper to the context.
        Specified by:
        apply in interface Helper<java.lang.Object>
        Parameters:
        context - The context object.
        options - The options object.
        Returns:
        A string result.
        Throws:
        java.io.IOException - If a template cannot be loaded.