public class JZtxtcmdExecuter
extends java.lang.Object
JZtxtcmdScript
.
It can be executed with a given script:
execute(JZtxtcmdScript, boolean, boolean, Appendable, String)
executes a given translated script.
execSub(org.vishia.cmd.JZtxtcmdScript.Subroutine, Map, boolean, Appendable, File)
executes one subroutine
from a translated script. It is possible to translate a script one time, and then invoke any subroutine
from a java context on demand.
#initialize(JZtxtcmdScript, boolean, Map, String, boolean)
cleans the instance and generates all script variables.
It prepares usage for execSub(org.vishia.cmd.JZtxtcmdScript.Subroutine, Map, boolean, Appendable, File)
.
reset()
cleans the instance. The scriptvariables will be generate
by first call of execute(JZtxtcmdScript, boolean, boolean, Appendable, String)
CompiledScript
eval method start JZtxtcmdScript.eval(ScriptContext)
with an instance of scriptLevel()
.
#execute(JZcmdScript, boolean, boolean, Appendable))
is running.
You should not use the instance concurrently in more as one thread. But you can use this instance
for one after another call of #execute(JZtxtcmdScript, boolean, boolean, Appendable)
.
Note that Threads can be created in the script.
Modifier and Type | Class and Description |
---|---|
static class |
JZtxtcmdExecuter.CmdErrorLevelException
A thread instance of JZcmd.
|
static class |
JZtxtcmdExecuter.ExecuteLevel
Wrapper to generate a script with specified localVariables.
|
static class |
JZtxtcmdExecuter.ExitException |
protected static class |
JZtxtcmdExecuter.JZcmdBindings |
static class |
JZtxtcmdExecuter.JZcmdThrow |
protected static class |
JZtxtcmdExecuter.JzScriptException |
static class |
JZtxtcmdExecuter.JzTcMain
This class is the jzcmd main level from a script.
|
static class |
JZtxtcmdExecuter.ListMap
It is a List but also with Map
|
static class |
JZtxtcmdExecuter.NextNr
Simple class to build a countered number.
|
Modifier and Type | Field and Description |
---|---|
private JZtxtcmdExecuter.JzTcMain |
acc
The usable instance of the JZtxtcmdExecuter for some managements.
|
protected java.lang.String |
accessError
Variable for any exception while accessing any java resources.
|
static short |
kBreak
Should break a loop, break statement.
|
static short |
kException
Has thrown an not catch exception. onerror statement not found.
|
private static short |
kFalse
Only internal designation.
|
static short |
kReturn
Should return from subroutine, return statement.
|
static short |
kSuccess
Should continue.
|
private static java.lang.CharSequence |
retException
This instance is used to mark a return object as exception return.
|
static java.util.Map<java.lang.String,DataAccess.Variable<java.lang.Object>> |
useScriptLevel
This is an instance used as marker for
execSub(org.vishia.cmd.JZtxtcmdScript.Subroutine, Map, boolean, Appendable, File)
for the argument args to use the script level in the sub routine variable instead. |
static java.lang.String |
version
Version, history and license.
|
Constructor and Description |
---|
JZtxtcmdExecuter()
Creates a JZcmdExecuter with possible writing exceptions in the output text.
|
JZtxtcmdExecuter(LogMessage log)
Creates a JZcmdExecuter with possible writing exceptions in the output text.
|
Modifier and Type | Method and Description |
---|---|
boolean |
abortCmdExecution()
Aborts all
CmdExecuter for operation system calls in all threads of this. |
private boolean |
checkInitialize(JZtxtcmdScript script,
boolean accessPrivate,
java.lang.CharSequence sCurrdir) |
private boolean |
checkInitialize(JZtxtcmdScript script,
boolean accessPrivate,
java.util.List<DataAccess.Variable<java.lang.Object>> args,
java.lang.CharSequence sCurrdir) |
private boolean |
checkInitialize(JZtxtcmdScript script,
boolean accessPrivate,
java.util.Map<java.lang.String,DataAccess.Variable<java.lang.Object>> args,
java.lang.CharSequence sCurrdir) |
private boolean |
checkInitialize(JZtxtcmdScript script,
boolean accessPrivate,
java.util.Map<java.lang.String,DataAccess.Variable<java.lang.Object>> args,
java.io.File currdir) |
java.util.Map<java.lang.String,DataAccess.Variable<java.lang.Object>> |
execSub(JZtxtcmdScript.Subroutine statement,
java.util.List<DataAccess.Variable<java.lang.Object>> arglist,
boolean accessPrivate,
java.lang.Appendable out,
java.io.File currdir,
CmdExecuter cmdExecuter)
Executes the given sub routine invoked from any user application.
|
java.util.Map<java.lang.String,DataAccess.Variable<java.lang.Object>> |
execSub(JZtxtcmdScript.Subroutine statement,
java.util.Map<java.lang.String,DataAccess.Variable<java.lang.Object>> args,
boolean accessPrivate,
java.lang.Appendable out,
java.io.File currdir)
Executes a subroutine.
|
java.util.Map<java.lang.String,DataAccess.Variable<java.lang.Object>> |
execSub(JZtxtcmdScript script,
java.lang.String name,
java.util.List<DataAccess.Variable<java.lang.Object>> args,
boolean accessPrivate,
java.lang.Appendable out,
java.io.File currdir)
Executes a subroutine.
|
java.util.Map<java.lang.String,DataAccess.Variable<java.lang.Object>> |
execSub(JZtxtcmdScript script,
java.lang.String name,
java.util.Map<java.lang.String,DataAccess.Variable<java.lang.Object>> args,
boolean accessPrivate,
java.lang.Appendable out,
java.io.File currdir)
Executes a subroutine.
|
(package private) void |
execute_i(JZtxtcmdScript script,
boolean accessPrivate,
boolean bWaitForThreads,
java.lang.String sCurrdir,
boolean bscriptInitialized)
Inner routine to process the execution after initializing the script.
|
JZtxtcmdExecuter.ExecuteLevel |
execute_Scriptclass(JZtxtcmdScript.JZcmdClass clazz)
Executes the code of a class in a script without checking the whole script.
|
JZtxtcmdExecuter.ExecuteLevel |
execute_Scriptclass(java.lang.String sClazz)
Initializes respectively calculates a class newly.
|
void |
execute(JZtxtcmdScript script,
boolean accessPrivate,
boolean bWaitForThreads,
java.lang.Appendable outFromCmdlineArg,
java.util.List<DataAccess.Variable<java.lang.Object>> data,
java.lang.String sCurrdir)
Executes the given script.
|
void |
execute(JZtxtcmdScript script,
boolean accessPrivate,
boolean bWaitForThreads,
java.lang.Appendable outFromCmdlineArg,
java.util.Map<java.lang.String,DataAccess.Variable<java.lang.Object>> data,
java.lang.String sCurrdir)
Executes the given script.
|
void |
execute(JZtxtcmdScript script,
boolean accessPrivate,
boolean bWaitForThreads,
java.lang.Appendable outFromCmdlineArg,
java.lang.String sCurrdir)
Executes the given script.
|
void |
executeScriptLevel(JZtxtcmdScript script,
java.lang.CharSequence sCurrdir)
Stores the script and executes the script level to generate the script level variables, especially the script variables were calculated yet.
|
JZtxtcmdScript |
getScript()
Returns the currently assigned script, maybe null on start.
|
DataAccess.Variable<java.lang.Object> |
getScriptVariable(java.lang.String name) |
private void |
initialize_i(JZtxtcmdScript script,
boolean accessPrivate,
java.lang.CharSequence sCurrdirArg) |
void |
initialize(JZtxtcmdScript script,
boolean accessPrivate,
java.lang.CharSequence sCurrdirArg)
Initializes the standard script variables and maybe executes the script level.
|
void |
initialize(JZtxtcmdScript script,
boolean accessPrivate,
java.util.List<DataAccess.Variable<java.lang.Object>> srcVariables,
java.lang.CharSequence sCurrdirArg)
Initializes the standard script variables and maybe executes the script level.
|
void |
initialize(JZtxtcmdScript script,
boolean accessPrivate,
java.util.List<DataAccess.Variable<java.lang.Object>> srcVariables,
java.util.Map<java.lang.String,DataAccess.Variable<java.lang.Object>> envar,
java.lang.CharSequence sCurrdirArg)
Initializes the standard script variables and maybe executes the script level.
|
void |
initialize(JZtxtcmdScript script,
boolean accessPrivate,
java.util.Map<java.lang.String,DataAccess.Variable<java.lang.Object>> srcVariables,
java.lang.CharSequence sCurrdirArg)
Initializes the standard script variables and maybe executes the script level.
|
JZtxtcmdExecuter.ExecuteLevel |
newExecuteLevel(JZtxtcmdThreadData threadData)
Creates a ExecuteLevel for the script which can be used to execute some sub routines (not only main)
in the given thread on demand.
|
DataAccess.Variable<java.lang.Object> |
removeScriptVariable(java.lang.String name) |
void |
reset()
Clears the instance.
|
JZtxtcmdExecuter.ExecuteLevel |
scriptLevel()
Returns the script level instance.
|
java.util.Map<java.lang.String,DataAccess.Variable<java.lang.Object>> |
scriptVariables()
Returns the association to all script variables.
|
void |
setScriptVariable(java.lang.String name,
char type,
java.lang.Object content,
boolean bConst)
Deprecated.
It is deprecated now. On start of a script or a subroutine from a script a List or Map of additional script variables
can be provided. This is a safe but other way. The script variable created with this routine may be removed if the script
was newly initialized. Only if the following order of execution is given, it is proper:
initialize(script, accessPrivate, currDir); //will initialize setScriptVariable(name, type, content, const); execute(script, ....);The JZcmdExecuter instance should be firstly initialize with the same script. |
(package private) void |
stop() |
public static final java.lang.String version
getScript()
,
newExecuteLevel(JZtxtcmdThreadData)
, ExecuteLevel#exec_Subroutine(Subroutine, List, StringFormatter, int)
Used for org.vishia.gral.cfg.GuiCfg
in srcJava_vishiaGui component.
JZtxtcmdExecuter.ExecuteLevel.changeCurrDir(CharSequence)
now sets the "user.dir" Java system's property.
With them it is possible generally in Java to open a file via FileFunctions.newFile(System.getProperty("user.dir"), sRelativePath),
then this is effective. It does not effect the operation system's PWD, but usable via this property.
JZtxtcmdScript.createScriptFromString(org.vishia.util.StringPartScan, LogMessage, File, File)
the included script statements are stored in the JZtxtcmdScript.JZcmdInclude
item itself,
and executed in this order. Additonal case '.' in JZtxtcmdExecuter.ExecuteLevel.execute(org.vishia.cmd.JZtxtcmdScript.StatementList, StringFormatter, int, Map, int)
.
JZtxtcmdScript
is translated and started.
Used firstly for the Stimuli Selector GUI https://vishia.org/StimuliSel/html/StimuliSel.html
JZtxtcmdExecuter.JzTcMain.envar
for simple access to Java data from the calling environment.
initialize(JZtxtcmdScript, boolean, List, Map, CharSequence)
enhanced for that.
List ... [ @ <$?keyVariableName> ]
then the List is stored
with a Map part to access an element via the value in the named variable. Access possible via get(name)
onerror{}
was syntactically admissible but the execution crashes. fixed.
text = appendableObj
can be used yet, it is especially to assign the text output to an GUI output box widget.
&access.path&myfileset
or &access.onefile
or &myFileset
The older scripts are running unregarded of this change. The description in
www.vishia.org/.../JZtxtcmd.html is renewed.
Obj name :type = ....
,
checking of the type now on assigning of the value. This feature was prepared in syntax but not implemented till now.
Subtext name = ...
,
for(variable:container && !variable.check());
especially to search somewhat in a container.
<:s>
to skip over white spaces and the next line indentation.
jzcmd.currdir()
in the script.
text = newFile;
to change the <+>output<.+>
has a less semantic effect. Therefore it is replaced by <+:create>newFile<.+>
or <+:append>...
with the possibility of append to an existing file.
File: "myFile".exists()
or adequate. A relative filename
is related to the {@link JZtxtcmdExecuter.ExecuteLevel#currdir()}.
text = path/to/output
is able to set in the script yet too.
<+>text output<.+>
now. It is adequate like
{@link #execute(JZtxtcmdScript, boolean, boolean, Appendable, String)}
private final JZtxtcmdExecuter.JzTcMain acc
protected java.lang.String accessError
public static final short kBreak
public static final short kReturn
private static final short kFalse
public static final short kException
public static final short kSuccess
private static java.lang.CharSequence retException
public static java.util.Map<java.lang.String,DataAccess.Variable<java.lang.Object>> useScriptLevel
execSub(org.vishia.cmd.JZtxtcmdScript.Subroutine, Map, boolean, Appendable, File)
for the argument args to use the script level in the sub routine variable instead.public JZtxtcmdExecuter(LogMessage log)
log
- maybe nullpublic JZtxtcmdExecuter()
public void initialize(JZtxtcmdScript script, boolean accessPrivate, java.util.Map<java.lang.String,DataAccess.Variable<java.lang.Object>> srcVariables, java.lang.CharSequence sCurrdirArg) throws javax.script.ScriptException
#execute(JZtxtcmdScript, boolean, boolean, Appendable)
with maybe several scripts,
which should not contain script variables, or one should call
#execSub(org.vishia.cmd.JZtxtcmdScript.Subroutine, Map, boolean, Appendable)
with one of the subroutines in the given script.genScriptArg
- Generation script in java-prepared form. It contains the building prescript
for the script variables.accessPrivate
- decision whether private and protected members from Java instances can be accessed.srcVariables
- sCurrdir
- bExecuteScriptLevel
- javax.script.ScriptException
public void initialize(JZtxtcmdScript script, boolean accessPrivate, java.util.List<DataAccess.Variable<java.lang.Object>> srcVariables, java.util.Map<java.lang.String,DataAccess.Variable<java.lang.Object>> envar, java.lang.CharSequence sCurrdirArg) throws javax.script.ScriptException
#execute(JZtxtcmdScript, boolean, boolean, Appendable)
with maybe several scripts,
which should not contain script variables, or one should call
#execSub(org.vishia.cmd.JZtxtcmdScript.Subroutine, Map, boolean, Appendable)
with one of the subroutines in the given script.script
- jzTc script in java-prepared form. It contains the building prescript
for the script variables.accessPrivate
- decision whether private and protected members from Java instances can be accessed.srcVariables
- envar
- Variables from the Java environment used by reference. Preserve content on new initialized script.
The new initialized script can use the before set content.sCurrdir
- bExecuteScriptLevel
- javax.script.ScriptException
public void initialize(JZtxtcmdScript script, boolean accessPrivate, java.util.List<DataAccess.Variable<java.lang.Object>> srcVariables, java.lang.CharSequence sCurrdirArg) throws javax.script.ScriptException
#execute(JZtxtcmdScript, boolean, boolean, Appendable)
with maybe several scripts,
which should not contain script variables, or one should call
#execSub(org.vishia.cmd.JZtxtcmdScript.Subroutine, Map, boolean, Appendable)
with one of the subroutines in the given script.genScriptArg
- Generation script in java-prepared form. It contains the building prescript
for the script variables.accessPrivate
- decision whether private and protected members from Java instances can be accessed.srcVariables
- sCurrdir
- bExecuteScriptLevel
- javax.script.ScriptException
public void initialize(JZtxtcmdScript script, boolean accessPrivate, java.lang.CharSequence sCurrdirArg) throws javax.script.ScriptException
#execute(JZtxtcmdScript, boolean, boolean, Appendable)
with maybe several scripts,
which should not contain script variables, or one should call
#execSub(org.vishia.cmd.JZtxtcmdScript.Subroutine, Map, boolean, Appendable)
with one of the subroutines in the given script.genScriptArg
- Generation script in java-prepared form. It contains the building prescript
for the script variables.accessPrivate
- decision whether private and protected members from Java instances can be accessed.srcVariables
- sCurrdir
- bExecuteScriptLevel
- javax.script.ScriptException
private void initialize_i(JZtxtcmdScript script, boolean accessPrivate, java.lang.CharSequence sCurrdirArg) throws javax.script.ScriptException
javax.script.ScriptException
public final JZtxtcmdScript getScript()
public void executeScriptLevel(JZtxtcmdScript script, java.lang.CharSequence sCurrdir) throws javax.script.ScriptException
initialize(JZtxtcmdScript, boolean, Map, CharSequence)
may had invoked before, then the standard variables are created already.
Any additional user variable can be stored also. If the JZtxtcmdExecuter.ExecuteLevel.localVariables
are empty,
then initialize(JZtxtcmdScript, boolean, Map, CharSequence)
is called with the script instead.
execSub(org.vishia.cmd.JZtxtcmdScript.Subroutine, Map, boolean, Appendable, File)
for a sub routine which does not use script level variables, for example to set parameter.
Note: The standard script variables are set with #initialize(JZtxtcmdScript, boolean, Map, String, boolean)
already.script
- The given scriptjavax.script.ScriptException
public JZtxtcmdExecuter.ExecuteLevel execute_Scriptclass(java.lang.String sClazz) throws javax.script.ScriptException
sClazz
- Namejavax.script.ScriptException
public JZtxtcmdExecuter.ExecuteLevel execute_Scriptclass(JZtxtcmdScript.JZcmdClass clazz) throws javax.script.ScriptException
clazz
- the class in any Scriptjavax.script.ScriptException
public JZtxtcmdExecuter.ExecuteLevel newExecuteLevel(JZtxtcmdThreadData threadData)
threadData
- environment for the specific JzTxtCmd threadpublic java.util.Map<java.lang.String,DataAccess.Variable<java.lang.Object>> scriptVariables()
public JZtxtcmdExecuter.ExecuteLevel scriptLevel()
JZtxtcmdExecuter.ExecuteLevel.localVariables
of the script level are the script variables.
They are filled with the given script on call of #initialize(JZtxtcmdScript, boolean, Map, String, boolean)
or if execute(JZtxtcmdScript, boolean, boolean, Appendable, String)
was called.public void reset()
public boolean abortCmdExecution()
CmdExecuter
for operation system calls in all threads of this.private boolean checkInitialize(JZtxtcmdScript script, boolean accessPrivate, java.util.Map<java.lang.String,DataAccess.Variable<java.lang.Object>> args, java.lang.CharSequence sCurrdir) throws javax.script.ScriptException
javax.script.ScriptException
private boolean checkInitialize(JZtxtcmdScript script, boolean accessPrivate, java.util.List<DataAccess.Variable<java.lang.Object>> args, java.lang.CharSequence sCurrdir) throws javax.script.ScriptException
javax.script.ScriptException
private boolean checkInitialize(JZtxtcmdScript script, boolean accessPrivate, java.lang.CharSequence sCurrdir) throws javax.script.ScriptException
javax.script.ScriptException
private boolean checkInitialize(JZtxtcmdScript script, boolean accessPrivate, java.util.Map<java.lang.String,DataAccess.Variable<java.lang.Object>> args, java.io.File currdir) throws javax.script.ScriptException
javax.script.ScriptException
public void execute(JZtxtcmdScript script, boolean accessPrivate, boolean bWaitForThreads, java.lang.Appendable outFromCmdlineArg, java.util.Map<java.lang.String,DataAccess.Variable<java.lang.Object>> data, java.lang.String sCurrdir) throws javax.script.ScriptException
execute(JZtxtcmdScript, boolean, boolean, Appendable, String)
given
- data as input.javax.script.ScriptException
public void execute(JZtxtcmdScript script, boolean accessPrivate, boolean bWaitForThreads, java.lang.Appendable outFromCmdlineArg, java.util.List<DataAccess.Variable<java.lang.Object>> data, java.lang.String sCurrdir) throws javax.script.ScriptException
execute(JZtxtcmdScript, boolean, boolean, Appendable, String)
data
- data as input.javax.script.ScriptException
public void execute(JZtxtcmdScript script, boolean accessPrivate, boolean bWaitForThreads, java.lang.Appendable outFromCmdlineArg, java.lang.String sCurrdir) throws javax.script.ScriptException
script
- The script. If this instance was used with the same script before, the calculated script variables are not refreshed.
That may be important if script variables are produced by running sub routines before. Use reset()
if that is not desired.
If the script is another and after reset()
, previous script variables are removed firstly, and the script variables
and script statements are firstly processed.accessPrivate
- bWaitForThreads
- should set to true if it is a command line invocation of Java,
the exit should wait for all threads. May set to false if calling inside a long running application.out
- Any output for text generation using <+>text output<.>.
It is used also for direct text output <:>text<.>.
sCurrdir
- maybe null, the current directory. If given, it is set in any case for the script level.java.io.IOException
- only if out.append throws it.java.lang.IllegalAccessException
- if a const scriptVariable are attempt to modify.javax.script.ScriptException
void execute_i(JZtxtcmdScript script, boolean accessPrivate, boolean bWaitForThreads, java.lang.String sCurrdir, boolean bscriptInitialized) throws javax.script.ScriptException
script
- The compiled script.accessPrivate
- true if private access to any given Java data inside a script.bWaitForThreads
- true then wait for finish all threads to exitoutFromCmdline
- If System.out
then it can be overridden by internal given text = path/to/file
It is set by cmd line invocation with -o=file with opend file.
If text = path/to/file
is given by initializing the script, the given file will be closed and the script determinedsCurrdir
- bscriptInitialized
- javax.script.ScriptException
public java.util.Map<java.lang.String,DataAccess.Variable<java.lang.Object>> execSub(JZtxtcmdScript script, java.lang.String name, java.util.Map<java.lang.String,DataAccess.Variable<java.lang.Object>> args, boolean accessPrivate, java.lang.Appendable out, java.io.File currdir) throws javax.script.ScriptException
execSub(org.vishia.cmd.JZtxtcmdScript.Subroutine, List, boolean, Appendable, File, CmdExecuter)
.
This variation should be used only if the args are given for example and especially as Variables in a Map.script
- maybe null. If null the last given script will be used. If not null and not equal the given script this script
will be newly used. initialize(JZtxtcmdScript, boolean, CharSequence)
will be invoked then.args
- given as Map. It is converted to a list firstly.javax.script.ScriptException
public java.util.Map<java.lang.String,DataAccess.Variable<java.lang.Object>> execSub(JZtxtcmdScript script, java.lang.String name, java.util.List<DataAccess.Variable<java.lang.Object>> args, boolean accessPrivate, java.lang.Appendable out, java.io.File currdir) throws javax.script.ScriptException
execSub(org.vishia.cmd.JZtxtcmdScript.Subroutine, List, boolean, Appendable, File, CmdExecuter)
if the subroutine is found per name in the given script.script
- The script. If this instance was used with the same script before, the calculated script variables are not refreshed.
That may be important if script variables are produced by running sub routines before. Use reset()
if that is not desired.
If the script is another and after reset()
, previous script variables are removed firstly, and the script variables
and script statements are firstly processed.name
- of the sub routine in the given script. Maybe in form "theclass.thesub"-args
- given as Map. It is converted to a list firstly.javax.script.ScriptException
public java.util.Map<java.lang.String,DataAccess.Variable<java.lang.Object>> execSub(JZtxtcmdScript.Subroutine statement, java.util.Map<java.lang.String,DataAccess.Variable<java.lang.Object>> args, boolean accessPrivate, java.lang.Appendable out, java.io.File currdir) throws javax.script.ScriptException
execSub(org.vishia.cmd.JZtxtcmdScript.Subroutine, List, boolean, Appendable, File, CmdExecuter)
.
This variation should be used only if the args are given for example and especially as Variables in a Map.args
- given as Map. It is converted to a list firstly.javax.script.ScriptException
public java.util.Map<java.lang.String,DataAccess.Variable<java.lang.Object>> execSub(JZtxtcmdScript.Subroutine statement, java.util.List<DataAccess.Variable<java.lang.Object>> arglist, boolean accessPrivate, java.lang.Appendable out, java.io.File currdir, CmdExecuter cmdExecuter) throws javax.script.ScriptException
#startmilli
and #startnano
starts newly. This is the core routine.statement
- The subroutine in a script. The script of this subroutine is used as new script.
If this instance was used with the same script before, the calculated script variables are not refreshed.
That may be important if script variables are produced by running sub routines before. Use reset()
if that is not desired.
If the script is another and after reset()
, previous script variables are removed firstly, and the script variables
and script statements are firstly processed.args
- Some variables which are stored as argument values. Use useScriptLevel
to advertise that no extra level should be used.
Then all changed and created variables are part of the script level.accessPrivate
- flag for access private Java data.out
- Any output for text generation using <+>text output<.>.
It is used also for direct text output <:>text<.>.
currdir
- if not null, then this directory is used as JZtxtcmdExecuter.ExecuteLevel.changeCurrDir(CharSequence)
for this subroutine.java.lang.Throwable
java.io.IOException
javax.script.ScriptException
@Deprecated public void setScriptVariable(java.lang.String name, char type, java.lang.Object content, boolean bConst) throws java.lang.IllegalAccessException
initialize(script, accessPrivate, currDir); //will initialize setScriptVariable(name, type, content, const); execute(script, ....);The JZcmdExecuter instance should be firstly initialize with the same script.
DataAccess.createOrReplaceVariable()
will be called
with the given scriptLevel()
.JZtxtcmdExecuter.ExecuteLevel.localVariables
name
- Name of the script variabletype
- One of DataAccess.Variable#type()
content
- bConst
- java.lang.IllegalAccessException
public DataAccess.Variable<java.lang.Object> getScriptVariable(java.lang.String name) throws java.lang.NoSuchFieldException
java.lang.NoSuchFieldException
public DataAccess.Variable<java.lang.Object> removeScriptVariable(java.lang.String name)
void stop()