| Modifier and Type | Class and Description |
|---|---|
class |
Engine.Sub |
| Constructor and Description |
|---|
Engine() |
| Modifier and Type | Method and Description |
|---|---|
Object |
call(String subroutineName,
Object... args) |
void |
eval(File sourceFile)
Evaluate the content of a file.
|
void |
eval(Reader reader)
Read the content of a stream provided by the reader and interpret this as
a BASIC program.
|
void |
eval(String sourceCode)
Evaluate a string as a BASIC program.
|
void |
eval(String sourceFileName,
SourcePath path)
Read the content of the file and execute it.
|
void |
eval(String sourceName,
SourceProvider provider)
Read the content of the source from the file, db...
|
void |
eval(String sourceFileName,
String... path)
Read the content of the file and execute it.
|
void |
execute()
Execute a previously loaded code.
|
Factory |
getBasicFactory()
Get the factory used to create the different parts of the execution
environment for this engine.
|
Writer |
getError()
Get the output writer used to write the error output of the BASIC
program.
|
Reader |
getInput()
Get the reader from where the BASIC program reads the standard input
characters.
|
int |
getNumberOfArguments(String subroutineName) |
Writer |
getOutput()
Get the output writer used to write the standard output of the BASIC
program.
|
Subroutine |
getSubroutine(String subroutineName) |
Iterable<String> |
getSubroutineNames() |
Iterable<Subroutine> |
getSubroutines() |
Object |
getVariable(String name) |
Iterable<String> |
getVariablesIterator() |
void |
load(File sourceFile)
Evaluate the content of a file.
|
void |
load(Reader reader)
Read the content of a stream provided by the reader and interpret this as
a BASIC program.
|
void |
load(String sourceCode)
Load a string as a BASIC program.
|
void |
load(String sourceFileName,
SourcePath path)
Read the content of the file and execute it.
|
void |
load(String sourceName,
SourceProvider provider)
Read the content of the source from the file, db...
|
void |
load(String sourceFileName,
String... path)
Read the content of the file and execute it.
|
void |
setError(Writer error)
Set the output writer used to write the error output of the BASIC
program.
|
void |
setInput(Reader input)
Set the reader from where the BASIC program reads the standard input
characters.
|
void |
setOutput(Writer output)
Set the output writer used to write the standard output of the BASIC
program.
|
void |
setVariable(String name,
Object value) |
public Factory getBasicFactory()
EngineApiIf ever you need to use this method, do use it at your own risk, and inform the developers of your need so that they may consider extending this facade to accommodate your needs.
getBasicFactory in interface EngineApipublic Reader getInput()
EngineApipublic void setInput(Reader input)
EngineApipublic Writer getOutput()
EngineApipublic void setOutput(Writer output)
EngineApipublic Writer getError()
EngineApipublic void setError(Writer error)
EngineApipublic void execute()
throws ScriptBasicException
EngineApiexecute in interface EngineApiScriptBasicExceptionpublic void load(String sourceCode) throws ScriptBasicException
EngineApiload in interface EngineApisourceCode - contains the source code as stringScriptBasicExceptionpublic void eval(String sourceCode) throws ScriptBasicException
EngineApieval in interface EngineApisourceCode - contains the source code as stringScriptBasicExceptionpublic void load(Reader reader) throws ScriptBasicException
EngineApiload in interface EngineApireader - the reader to supply the BASIC program characters.ScriptBasicExceptionpublic void eval(Reader reader) throws ScriptBasicException
EngineApieval in interface EngineApireader - the reader to supply the BASIC program characters.ScriptBasicExceptionpublic void load(File sourceFile) throws ScriptBasicException
EngineApiload in interface EngineApisourceFile - the file handler pointing to the file that the interpreter
will read to get the source code.ScriptBasicExceptionpublic void eval(File sourceFile) throws ScriptBasicException
EngineApieval in interface EngineApisourceFile - the file handler pointing to the file that the interpreter
will read to get the source code.ScriptBasicExceptionpublic void load(String sourceFileName, String... path) throws ScriptBasicException
EngineApiload in interface EngineApisourceFileName - the file that contains the scriptpath - the array of path elements that are searched for included
filesScriptBasicExceptionpublic void eval(String sourceFileName, String... path) throws ScriptBasicException
EngineApieval in interface EngineApisourceFileName - the file that contains the scriptpath - the array of path elements that are searched for included
filesScriptBasicExceptionpublic void load(String sourceFileName, SourcePath path) throws ScriptBasicException
EngineApiload in interface EngineApisourceFileName - the file that contains the scriptpath - the path where included files are locatedScriptBasicExceptionpublic void eval(String sourceFileName, SourcePath path) throws ScriptBasicException
EngineApieval in interface EngineApisourceFileName - the file that contains the scriptpath - the path where included files are locatedScriptBasicExceptionpublic void load(String sourceName, SourceProvider provider) throws ScriptBasicException
EngineApisourceName using the provider. This method does not
execute the code.load in interface EngineApisourceName - the name of the source file where the source is. The syntax of
the name depends on the provider.provider - the source provider that helps the reader to read the contentScriptBasicExceptionpublic void eval(String sourceName, SourceProvider provider) throws ScriptBasicException
EngineApisourceName using the provider.eval in interface EngineApisourceName - the name of the source file where the source is. The syntax of
the name depends on the provider.provider - the source provider that helps the reader to read the contentScriptBasicExceptionpublic void setVariable(String name, Object value) throws ScriptBasicException
setVariable in interface EngineApiScriptBasicExceptionpublic Object getVariable(String name) throws ScriptBasicException
getVariable in interface EngineApiScriptBasicExceptionpublic Iterable<String> getVariablesIterator()
getVariablesIterator in interface EngineApipublic Object call(String subroutineName, Object... args) throws ScriptBasicException
call in interface EngineApiScriptBasicExceptionpublic Iterable<String> getSubroutineNames()
getSubroutineNames in interface EngineApipublic Iterable<Subroutine> getSubroutines()
getSubroutines in interface EngineApipublic int getNumberOfArguments(String subroutineName) throws ScriptBasicException
getNumberOfArguments in interface EngineApiScriptBasicExceptionpublic Subroutine getSubroutine(String subroutineName) throws ScriptBasicException
getSubroutine in interface EngineApiScriptBasicExceptionCopyright © 2012 Verhas and Verhas Software Craftsmen. All Rights Reserved.