Package com.googlecode.aviator
Class LiteralExpression
- java.lang.Object
-
- com.googlecode.aviator.BaseExpression
-
- com.googlecode.aviator.LiteralExpression
-
- All Implemented Interfaces:
Expression
,java.io.Serializable
public class LiteralExpression extends BaseExpression
A literal expression with a fixed result- See Also:
- Serialized Form
-
-
Field Summary
Fields Modifier and Type Field Description private java.lang.Object
result
private static long
serialVersionUID
-
Fields inherited from class com.googlecode.aviator.BaseExpression
FUNC_PARAMS_VAR, instance, lambdaBootstraps, sourceFile, symbolTable, varFullNames, varNames
-
-
Constructor Summary
Constructors Constructor Description LiteralExpression(AviatorEvaluatorInstance instance, java.lang.Object result, java.util.List<VariableMeta> vars)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description java.lang.Object
executeDirectly(java.util.Map<java.lang.String,java.lang.Object> env)
private void
readObject(java.io.ObjectInputStream input)
java.lang.String
toString()
private void
writeObject(java.io.ObjectOutputStream output)
-
Methods inherited from class com.googlecode.aviator.BaseExpression
addSymbol, afterPopulateFullNames, customReadObject, customWriteObject, execute, execute, execute, genTopEnv, getCompileEnv, getExpression, getFullNameMetas, getFunctionNames, getLambdaBootstraps, getSourceFile, getStringSegements, getVariableFullNames, getVariableNames, getVars, newEnv, newEnv, newEnv, newLambda, setCompileEnv, setExpression, setFuncsArgs, setFunctionNames, setInstance, setLambdaBootstraps, setSourceFile
-
-
-
-
Field Detail
-
serialVersionUID
private static final long serialVersionUID
- See Also:
- Constant Field Values
-
result
private java.lang.Object result
-
-
Constructor Detail
-
LiteralExpression
public LiteralExpression(AviatorEvaluatorInstance instance, java.lang.Object result, java.util.List<VariableMeta> vars)
-
-
Method Detail
-
executeDirectly
public java.lang.Object executeDirectly(java.util.Map<java.lang.String,java.lang.Object> env)
- Specified by:
executeDirectly
in classBaseExpression
-
toString
public java.lang.String toString()
- Overrides:
toString
in classjava.lang.Object
-
readObject
private void readObject(java.io.ObjectInputStream input) throws java.lang.ClassNotFoundException, java.io.IOException
- Throws:
java.lang.ClassNotFoundException
java.io.IOException
-
writeObject
private void writeObject(java.io.ObjectOutputStream output) throws java.io.IOException
- Throws:
java.io.IOException
-
-