anino.net/">Janino compiler.
This class is different from {@link ScriptFunction} in that it requires a new {@link Tuple} instance to be returnedby the script. ScriptFunction allows only a single value to be returned, which is passed into a result Tuple instance internally.
Specifically this function uses the {@link org.codehaus.janino.ScriptEvaluator}, thus the syntax from that class is inherited here.
A script may use field names directly as parameters in the expression, or field positions with the syntax "$n", where n is an integer.
Given an argument tuple with the fields "a" and "b", the following script returns true:
{@code boolean result = (a + b == $0 + $1);}
{@code return cascading.tuple.Tuples.tuple( boolean );}
Unlike an "expression" used by {@link ExpressionFunction}, a "script" requires each line to end in an semi-colon (@{code ;}) and the final line to be a {@code return} statement that returns a new {@link Tuple} instance.
Since Janino does not support "varargs", see the {@link cascading.tuple.Tuples} class for helper methods.
Further, the types of the tuple elements will be coerced into the given parameterTypes. Regardless of the actual tuple element values, they will be converted to the types expected by the script if possible.