Java Expression Templates
You can generate Java code for an expression using the simple or advanced Java c
ode for an expression.
The Java code for the expression is generated based on the template for the expr
ession.
The following example shows the template for a Java expression generated for sim
ple Java code:
Object function_name (Java datatype x1[,
Java datatype x2 ...] )
throws SDK Exception
{r
eturn (Object)invokeJExpression( String expression,
new Object [] { x1[, x2, ... ]} );
}
The following example shows the template for a Java expression generated by usin
g the advanced interface:
JExpression function_name () throws SDKException
{
JExprParamMetadata params[] = new JExprParamMetadata[number of parameters];
params[0] = new JExprParamMetadata (
EDataType.STRING, // data type
20, // precision
0 // scale
);
...
params[number of parameters - 1] = new JExprParamMetadata (
EDataType.STRING, // data type
20, // precision
0 // scale
);
...
return defineJExpression(String expression,params);
}
Working