Package com.googlecode.aviator
Interface Expression
- All Superinterfaces:
Serializable
- All Known Implementing Classes:
BaseExpression
,ClassExpression
,InterpretExpression
,LiteralExpression
A expression
-
Method Summary
Modifier and TypeMethodDescriptionAdds the specified symbol to the symbol table and returns a reference to the unique symbol.execute()
Execute an expression with an empty environment, returns the result.Execute an expression with an environment, returns the result.Returns the function names in the expression when using AviatorEvaluator.EVAL mode, otherwise returns an empty list.Returns the source file name.Returns this expression's all uninitialized global variable full names(contains dot) in order when using AviatorEvaluator.EVAL mode, otherwise returns an empty list.Returns this expression's all uninitialized global variable names in order when using AviatorEvaluator.EVAL mode, otherwise returns an empty list.Created a faster env map(compare variable names by reference).The arguments should be a sequence of pair invalid input: '<'String, Object>.
-
Method Details
-
execute
Execute an expression with an environment, returns the result.- Parameters:
env
- Binding variable environment- Returns:
- the result of execution
-
execute
Object execute()Execute an expression with an empty environment, returns the result.- Returns:
- the result of execution
-
getSourceFile
String getSourceFile()Returns the source file name.- Returns:
- the source file name
- Since:
- 5.2.3
-
getVariableNames
Returns this expression's all uninitialized global variable names in order when using AviatorEvaluator.EVAL mode, otherwise returns an empty list.- Returns:
- See Also:
-
getVariableFullNames
Returns this expression's all uninitialized global variable full names(contains dot) in order when using AviatorEvaluator.EVAL mode, otherwise returns an empty list.- Returns:
-
newEnv
Created a faster env map(compare variable names by reference).The arguments should be a sequence of pair invalid input: '<'String, Object>.- Parameters:
args
-- Returns:
- an env map
-
addSymbol
Adds the specified symbol to the symbol table and returns a reference to the unique symbol. If the symbol already exists, the previous symbol reference is returned instead, in order guarantee that symbol references remain unique.- Parameters:
name
- The symbol name.
-
getFunctionNames
Returns the function names in the expression when using AviatorEvaluator.EVAL mode, otherwise returns an empty list.- Returns:
- the function name list
- Since:
- 5.4.2
-