|
JTR 5.0 API Documentation | |||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectjtr.script.impl.AbstractScriptEngine
public abstract class AbstractScriptEngine
Base abstract script engine useful for writing new ones.
| Nested Class Summary | |
|---|---|
protected static class |
AbstractScriptEngine.StructuredScript
Utility class for reorganizing scripts in two main sections: imports body |
| Field Summary | |
|---|---|
protected static java.lang.String |
GLOBAL_JTR_CTX_IDENTIFIER
|
protected static org.apache.log4j.Logger |
logger
|
| Constructor Summary | |
|---|---|
AbstractScriptEngine()
|
|
| Method Summary | |
|---|---|
protected void |
consolidateLibrary()
This method puts into the library instance variable all the libary
scripts as a single string (actually a StringBuffer instance), organized
in a way that all the necessary import statements come before all the
library scripts. |
protected java.lang.String |
defineScript(PScript pScript)
This method appends the given pScript to the
previously reorganized library-scripts, in order to
make pScript executable. |
protected PScript |
findScript(java.lang.String scriptUID)
Finds the required parameterization-script using its unique name provided as input parameter. |
protected java.lang.String |
getEndStatementPattern()
Must return the pattern that represents the end of statement int the supported language. |
protected java.lang.String |
getImportPattern()
Must return the pattern that identifies an import in the supported language. |
protected Scripts |
getScripts()
Returns the configured scripts, both library scripts and parameterization scripts. |
protected AbstractScriptEngine.StructuredScript |
restructureScript(Script script)
Given the input script this method reorganizes it into
an instance of StructuredScript. |
protected void |
setActualParameters(PScript pScript,
ScriptParams actualParams)
|
protected abstract void |
setBooleanActualParameter(java.lang.String fpName,
java.lang.Boolean apValue)
Method that engine-specific subclasses must implement for setting actual parameters before execution. |
protected abstract void |
setDoubleActualParameter(java.lang.String fpName,
java.lang.Double apValue)
Method that engine-specific subclasses must implement for setting actual parameters before execution. |
protected abstract void |
setFloatActualParameter(java.lang.String fpName,
java.lang.Float apValue)
Method that engine-specific subclasses must implement for setting actual parameters before execution. |
protected abstract void |
setIntegerActualParameter(java.lang.String fpName,
java.lang.Integer apValue)
Method that engine-specific subclasses must implement for setting actual parameters before execution. |
protected abstract void |
setLongActualParameter(java.lang.String fpName,
java.lang.Long apValue)
Method that engine-specific subclasses must implement for setting actual parameters before execution. |
protected abstract void |
setObjectActualParameter(java.lang.String fpName,
java.lang.Object apValue)
Method that engine-specific subclasses must implement for setting actual parameters before execution. |
void |
setScripts(Scripts scripts)
Sets the configured collection of both l-scripts and p-scripts. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Methods inherited from interface jtr.script.IScriptEngine |
|---|
execute, newInstance |
| Field Detail |
|---|
protected static final java.lang.String GLOBAL_JTR_CTX_IDENTIFIER
protected static final org.apache.log4j.Logger logger
| Constructor Detail |
|---|
public AbstractScriptEngine()
| Method Detail |
|---|
protected abstract void setBooleanActualParameter(java.lang.String fpName,
java.lang.Boolean apValue)
fpName - apValue -
protected abstract void setDoubleActualParameter(java.lang.String fpName,
java.lang.Double apValue)
fpName - apValue -
protected abstract void setFloatActualParameter(java.lang.String fpName,
java.lang.Float apValue)
fpName - apValue -
protected abstract void setIntegerActualParameter(java.lang.String fpName,
java.lang.Integer apValue)
fpName - apValue -
protected abstract void setLongActualParameter(java.lang.String fpName,
java.lang.Long apValue)
fpName - apValue -
protected abstract void setObjectActualParameter(java.lang.String fpName,
java.lang.Object apValue)
fpName - apValue - public void setScripts(Scripts scripts)
setScripts in interface IScriptEnginescripts - protected Scripts getScripts()
protected PScript findScript(java.lang.String scriptUID)
null
if nothing can be found.
scriptUID -
protected void setActualParameters(PScript pScript,
ScriptParams actualParams)
throws ScriptException
interpreter - pScript - actualParams -
bsh.EvalError
ScriptExceptionprotected void consolidateLibrary()
library instance variable all the libary
scripts as a single string (actually a StringBuffer instance), organized
in a way that all the necessary import statements come before all the
library scripts.
protected AbstractScriptEngine.StructuredScript restructureScript(Script script)
script this method reorganizes it into
an instance of StructuredScript.
script -
protected java.lang.String getImportPattern()
null return value means that the
language has no import concept.import.
protected java.lang.String getEndStatementPattern()
null value will be interpreted as
;.;.
protected java.lang.String defineScript(PScript pScript)
pScript to the
previously reorganized library-scripts, in order to
make pScript executable.
pScript -
|
The JTR Project is licensed under GPL version 2 | |||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||