public class Binding extends RuleElement
Modifier and Type | Field and Description |
---|---|
private Binding |
alias |
private static int |
BIND_VAR |
private int |
callArrayIndex |
private java.lang.String |
descriptor |
private static int |
HELPER |
private int |
index |
private static int |
INVOKE_PARAM_ARRAY_VAR |
private static int |
LOCAL_VAR |
private int |
localIndex |
private java.lang.String |
name |
private static int |
PARAM_ARRAY_VAR |
private static int |
PARAM_COUNT_VAR |
private static int |
RETURN_VAR |
private static int |
THROWABLE_VAR |
private Type |
type |
(package private) boolean |
updated |
private Expression |
value |
rule
Constructor and Description |
---|
Binding(Rule rule,
java.lang.String name) |
Binding(Rule rule,
java.lang.String name,
Type type) |
Binding(Rule rule,
java.lang.String name,
Type type,
Expression value) |
Modifier and Type | Method and Description |
---|---|
void |
aliasTo(Binding alias) |
void |
compile(MethodVisitor mv,
CompileContext compileContext) |
Binding |
getAlias() |
int |
getCallArrayIndex() |
java.lang.String |
getDescriptor() |
int |
getIndex() |
int |
getLocalIndex() |
java.lang.String |
getName() |
Type |
getType() |
Expression |
getValue() |
java.lang.Object |
interpret(HelperAdapter helper) |
boolean |
isAlias() |
boolean |
isBindVar() |
boolean |
isHelper() |
boolean |
isInvokeParamArray() |
boolean |
isLocalVar() |
boolean |
isParam() |
boolean |
isParamArray() |
boolean |
isParamCount() |
boolean |
isRecipient() |
boolean |
isReturn() |
boolean |
isThrowable() |
boolean |
isUpdated()
record that this binding occurs on the LHS of an assignment
|
void |
setCallArrayIndex(int callArrayIndex) |
void |
setDescriptor(java.lang.String desc) |
void |
setLocalIndex(int localIndex) |
void |
setType(Type type) |
void |
setUpdated()
record that this binding occurs on the LHS of an assignment
|
Expression |
setValue(Expression value) |
Type |
typeCheck(Type expected) |
void |
writeTo(java.io.StringWriter stringWriter) |
compileBooleanConversion, compileBox, compileNumericConversion, compileObjectConversion, compilePrimitiveConversion, compileStringConversion, compileTypeConversion, compileUnbox, getBindings, getTypeGroup, toString
private static final int HELPER
private static final int BIND_VAR
private static final int LOCAL_VAR
private static final int RETURN_VAR
private static final int THROWABLE_VAR
private static final int PARAM_COUNT_VAR
private static final int PARAM_ARRAY_VAR
private static final int INVOKE_PARAM_ARRAY_VAR
private java.lang.String name
private java.lang.String descriptor
private Type type
private Expression value
private int index
private int callArrayIndex
private int localIndex
private Binding alias
boolean updated
public Binding(Rule rule, java.lang.String name)
public Binding(Rule rule, java.lang.String name, Type type, Expression value)
public Type typeCheck(Type expected) throws TypeException
typeCheck
in class RuleElement
TypeException
public java.lang.Object interpret(HelperAdapter helper) throws ExecuteException
interpret
in class RuleElement
ExecuteException
public void compile(MethodVisitor mv, CompileContext compileContext) throws CompileException
compile
in class RuleElement
CompileException
public java.lang.String getName()
public Expression getValue()
public Expression setValue(Expression value)
public Type getType()
public void setType(Type type)
public int getCallArrayIndex()
public void setCallArrayIndex(int callArrayIndex)
public int getLocalIndex()
public void setLocalIndex(int localIndex)
public boolean isParam()
public boolean isRecipient()
public boolean isHelper()
public boolean isBindVar()
public boolean isLocalVar()
public boolean isReturn()
public boolean isThrowable()
public boolean isParamCount()
public boolean isParamArray()
public boolean isInvokeParamArray()
public int getIndex()
public java.lang.String getDescriptor()
public void setDescriptor(java.lang.String desc)
public void setUpdated()
public boolean isUpdated()
public void writeTo(java.io.StringWriter stringWriter)
writeTo
in class RuleElement
public void aliasTo(Binding alias)
public boolean isAlias()
public Binding getAlias()