Package com.schibsted.spt.data.jslt
Class FunctionUtils
java.lang.Object
com.schibsted.spt.data.jslt.FunctionUtils
Useful methods for working with Functions.
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionstatic Function
wrapStaticMethod
(String functionName, String className, String methodName) Create a JSLT function from a static Java method.static Function
wrapStaticMethod
(String functionName, String className, String methodName, Class[] paramTypes) Create a JSLT function from a static Java method.
-
Constructor Details
-
FunctionUtils
public FunctionUtils()
-
-
Method Details
-
wrapStaticMethod
public static Function wrapStaticMethod(String functionName, String className, String methodName) throws LinkageError, ExceptionInInitializerError, ClassNotFoundException Create a JSLT function from a static Java method. This will fail if the method is overloaded. -
wrapStaticMethod
public static Function wrapStaticMethod(String functionName, String className, String methodName, Class[] paramTypes) throws LinkageError, ExceptionInInitializerError, ClassNotFoundException, NoSuchMethodException Create a JSLT function from a static Java method.- Parameters:
paramTypes
- Array of types used to match overloaded methods.- Throws:
LinkageError
ExceptionInInitializerError
ClassNotFoundException
NoSuchMethodException
-