public static interface ProcessCodeGenericTask.EvalFunction
| Modifier and Type | Method and Description |
|---|---|
java.lang.Object |
apply(java.lang.String functionName,
AugmentingCode augCode,
ProcessCodeContext context)
Invokes code evaluation facility in a scripting language context
to produce generated code object corresponding to an augmenting code object.
|
java.lang.Object apply(java.lang.String functionName,
AugmentingCode augCode,
ProcessCodeContext context)
throws java.lang.Exception
functionName - trimmed content of first line of current augmenting code object.
Although script can do anything it wants to with current augmenting code object,
it is strongly recommended that data driven programming paradigm be followed.
In that case this parameter refers to name of a function code evaluation facility should
call with (at least) 2 arguments: current augmenting code object and a
helper context object.augCode - current augmenting code objectcontext - helper context object available for use by scriptGeneratedCode instance or an array of such instances.
GeneratedCode.ContentPart instances can be returned as well. An instance of any other
class will have toString() called on it and used as a content part with inexact
matching.java.lang.Exception