Class JstlFile

  • All Implemented Interfaces:
    Callable, Function, Module

    public class JstlFile
    extends java.lang.Object
    implements Module, Function
    Represents a JSLT source code file loaded separately.
    • Field Summary

      Fields 
      Modifier and Type Field Description
      private ExpressionImpl body  
      private java.lang.String prefix  
      private java.lang.String source  
    • Constructor Summary

      Constructors 
      Constructor Description
      JstlFile​(java.lang.String prefix, java.lang.String source, ExpressionImpl body)  
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      com.fasterxml.jackson.databind.JsonNode call​(com.fasterxml.jackson.databind.JsonNode input, com.fasterxml.jackson.databind.JsonNode[] arguments)
      Perform the function on the given JSON input with the given arguments.
      void evaluateLetsOnly​(Scope scope, com.fasterxml.jackson.databind.JsonNode input)  
      Callable getCallable​(java.lang.String name)
      Returns the function with the given name.
      int getMaxArguments()
      The maximum number of arguments allowed.
      int getMinArguments()
      The minimum number of arguments allowed.
      java.lang.String getName()
      The name of the function.
      • Methods inherited from class java.lang.Object

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

      • prefix

        private java.lang.String prefix
      • source

        private java.lang.String source
    • Constructor Detail

      • JstlFile

        public JstlFile​(java.lang.String prefix,
                        java.lang.String source,
                        ExpressionImpl body)
    • Method Detail

      • getCallable

        public Callable getCallable​(java.lang.String name)
        Description copied from interface: Module
        Returns the function with the given name. The return value is a Callable, because the method may also return a macro.
        Specified by:
        getCallable in interface Module
      • getName

        public java.lang.String getName()
        Description copied from interface: Function
        The name of the function.
        Specified by:
        getName in interface Callable
        Specified by:
        getName in interface Function
      • call

        public com.fasterxml.jackson.databind.JsonNode call​(com.fasterxml.jackson.databind.JsonNode input,
                                                            com.fasterxml.jackson.databind.JsonNode[] arguments)
        Description copied from interface: Function
        Perform the function on the given JSON input with the given arguments.
        Specified by:
        call in interface Function
      • evaluateLetsOnly

        public void evaluateLetsOnly​(Scope scope,
                                     com.fasterxml.jackson.databind.JsonNode input)