ArrayExpression
, DollarExpression
, FieldExpression
, StaticExpression
, Variable
public abstract class AssignableExpression extends Expression
Modifier | Constructor | Description |
---|---|---|
protected |
AssignableExpression(Rule rule,
Type type,
ParseNode token) |
Create a new expression.
|
Modifier and Type | Method | Description |
---|---|---|
abstract void |
bindAssign() |
bind as an assignable expression.
|
abstract void |
compileAssign(org.objectweb.asm.MethodVisitor mv,
CompileContext compileContext) |
compile an assignment to the referenced location using the value on the top of the
Java stack.
|
abstract Object |
interpretAssign(HelperAdapter helperAdapter,
Object value) |
execute an assignment to the referenced location by interpretation of the expression,
using the object passed in this call
|
abstract Type |
typeCheckAssign(Type expected) |
typecheck the expression as an lvalue of an assignment operation
|
bind, getPos, getType, interpret, typeCheck, writeTo
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
compile, getBindings, getTypeGroup, rebox, toString
public abstract Type typeCheckAssign(Type expected) throws TypeException
expected
- the expected type for the expressionTypeException
- if a type check error occurspublic abstract Object interpretAssign(HelperAdapter helperAdapter, Object value) throws ExecuteException
helperAdapter
- an execution context associated with the rule which contains a map of
current bindings for rule variables and another map of their declared types both of which
are indexed by variable name. This includes entries for the helper (name "-1"), the
recipient if the trigger method is not static (name "0") and the trigger method arguments
(names "1", ...)value
- the value to be assigned to this objectExecuteException
- if an error occurs during executionpublic abstract void compileAssign(org.objectweb.asm.MethodVisitor mv, CompileContext compileContext) throws CompileException
mv
- the current method visitorcompileContext
- the current compile contextCompileException
- if a compile error occurspublic abstract void bindAssign() throws TypeException
TypeException
- if the expression contains an invalid or
unassignable referenceCopyright © 2018. All rights reserved.