|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Object
|
+--org.omegahat.Environment.Interpreter.BasicEvaluator
|
+--org.omegahat.Environment.Interpreter.UtilityEvaluator
This provides some simple utility methods
which act like functions for the interactive
user due to the implicit this
in the Omegahat language.
These are all syntactic sugar that simplify the access
to other objects that are available via the evaluator,
but akwardly so.
The utilities are
| Fields inherited from class org.omegahat.Environment.Interpreter.BasicEvaluator |
allowUnrestrictedAccess, class_lists, currentExpression, data, databases, debugger, DefaultAttachIndex, defaultDatabase, dynamicClassLoader, errorHandler, evaluationEvent, evaluationListeners, initialized, internalFunctionTables, internalPrimitiveClassNames, internalPrimitiveClassTable, lexer, localClasses, manager, options, output, parser, primitive_classes, primitiveClasses, PrimitiveClassNames, primitiveTypeNames, primitiveTypes, reversePrimitiveTypes, ShowMultipleClasses, sourceStack, stderr, stdout, SubEvaluationListeners, taskHistory, toplevelExpression, warningMessages |
| Fields inherited from interface org.omegahat.Environment.Interpreter.Evaluator |
ThisVariableName |
| Constructor Summary | |
UtilityEvaluator()
|
|
UtilityEvaluator(Evaluator parent)
Creation of the evaluator by copying the settings from the parent evaluator. |
|
UtilityEvaluator(EvaluatorManager manager)
Creation using the default evaluator from the manager and registering as a responsibility of the manager for use in its endeavors (e.g. |
|
UtilityEvaluator(Options opts)
Construction of the evaluator with the specified settings in the Options object. |
|
| Method Summary | |
Evaluator |
evaluator()
The current evaluator. |
java.lang.Object |
exec(java.lang.String cmd)
Executes the specified command as a sub-process and the lines of output resutling from the command. |
java.lang.Object |
exec(java.lang.String cmd,
boolean display)
Execute the specified shell command and return optionally the resulting Process object,
or a Vector of the output lines
displayed by executing the command, depending
on whether display is false or
true. |
java.lang.Object |
findFile(java.lang.String name)
Locate a file using the standard lookup mechanism available from the EvaluatorManager's
findFile()
method. |
Evaluator |
getEvaluator()
The current evaluator object. |
java.lang.String |
setProperty(java.lang.String name,
java.lang.String value)
Set the system-level property using the given name and value. |
java.lang.String |
setProperty(java.lang.String name,
java.lang.String value,
boolean append)
Optionally overwrite or append the value to the specified system property. |
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
public UtilityEvaluator()
public UtilityEvaluator(Options opts)
Options object.public UtilityEvaluator(Evaluator parent)
public UtilityEvaluator(EvaluatorManager manager)
| Method Detail |
public java.lang.Object findFile(java.lang.String name)
EvaluatorManager's
findFile()
method.name - the name of the file to be found.
public java.lang.String setProperty(java.lang.String name,
java.lang.String value)
name - the name of the property being modified.value - the value to which the property is to be set.
public java.lang.String setProperty(java.lang.String name,
java.lang.String value,
boolean append)
name - the name of the property of interestappend - whether to append or overwrite the current value, if any,
of the specified property.public Evaluator getEvaluator()
Provides as a property the the underlying this
object inherent in the evaluation model.
public Evaluator evaluator()
For consistency with JavaBeans conventions, use getEvaluator() instead of this method.
public java.lang.Object exec(java.lang.String cmd)
throws java.io.IOException
cmd - the shell commandexec(java.lang.String, boolean)
public java.lang.Object exec(java.lang.String cmd,
boolean display)
throws java.io.IOException
Process object,
or a Vector of the output lines
displayed by executing the command, depending
on whether display is false or
true.cmd - the shell command to executedisplay - whether to return the lines of output as
Vector or the Process
object.Process giving access to the resulting
process, or Vector object containing the lines of output
from the command.
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||