|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectorg.shapelogic.scripting.BaseScriptingFunction
org.shapelogic.scripting.FunctionEvalCalcInvoke<E>
public class FunctionEvalCalcInvoke<E>
Transform based on an expression in a Scripting language using JSR 223. Requires Groovy to be installed. Need special installation of groovy-engine.jar that need to be downloade from Sun. Requires that the scripting language support the invocable interface.
| Field Summary | |
|---|---|
protected boolean |
_dirty
|
protected E |
_value
|
| Fields inherited from class org.shapelogic.scripting.BaseScriptingFunction |
|---|
_expression, _functionName, _language, _scriptEngine, DEFAULT_LANGUAGE |
| Constructor Summary | |
|---|---|
FunctionEvalCalcInvoke(java.lang.String expression)
|
|
FunctionEvalCalcInvoke(java.lang.String expression,
java.lang.String language)
|
|
| Method Summary | |
|---|---|
E |
getValue()
Starts a lazy calculation. |
E |
invoke()
|
boolean |
isDirty()
When dirty is false that means that the calculated value can be used |
void |
setup()
Currently not super well define used for 2 purposes: Reset: called from the outside if you want to reuse it init: Called from the inside when calculation start to have everything setup maybe the semantic could work for both? TODO: This should be separated better. |
| Methods inherited from class org.shapelogic.scripting.BaseScriptingFunction |
|---|
getScriptEngine, put |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
|---|
protected boolean _dirty
protected E _value
| Constructor Detail |
|---|
public FunctionEvalCalcInvoke(java.lang.String expression,
java.lang.String language)
public FunctionEvalCalcInvoke(java.lang.String expression)
| Method Detail |
|---|
public E invoke()
invoke in interface Calc0<E>public boolean isDirty()
LazyCalc
isDirty in interface LazyCalc<E>public void setup()
LazyCalc
setup in interface LazyCalc<E>public E getValue()
CalcValue
getValue in interface CalcValue<E>
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||