Package com.schibsted.spt.data.jslt.impl
Class JstlFile
- java.lang.Object
-
- com.schibsted.spt.data.jslt.impl.JstlFile
-
-
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.
-
-
-
Field Detail
-
prefix
private java.lang.String prefix
-
body
private ExpressionImpl body
-
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 interfaceModule
-
getName
public java.lang.String getName()
Description copied from interface:Function
The name of the function.
-
getMinArguments
public int getMinArguments()
Description copied from interface:Function
The minimum number of arguments allowed.- Specified by:
getMinArguments
in interfaceCallable
- Specified by:
getMinArguments
in interfaceFunction
-
getMaxArguments
public int getMaxArguments()
Description copied from interface:Function
The maximum number of arguments allowed.- Specified by:
getMaxArguments
in interfaceCallable
- Specified by:
getMaxArguments
in interfaceFunction
-
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.
-
evaluateLetsOnly
public void evaluateLetsOnly(Scope scope, com.fasterxml.jackson.databind.JsonNode input)
-
-