public class LocalVariable extends ExplicitVariable implements ILocVar
| 限定符和类型 | 字段和说明 |
|---|---|
protected ScopeLogicVariable |
scopeLogicVar |
| 构造器和说明 |
|---|
LocalVariable(VarMeta lve) |
| 限定符和类型 | 方法和说明 |
|---|---|
boolean |
availableFor(AbstractOperator operator)
check the variable is available for current operator. for example
int i = 10;
if(i % 2 == 0) {
int j = 100;
System.out.println(i);
} else {
System.out.println(j);
}
The preceding code will be get an error cause by variable j is not
available for the second method call operator.
|
VarMeta |
getMeta()
Get meta
|
AClass |
getResultType() |
ScopeLogicVariable |
getScopeLogicVar()
Get the
ScopeLogicVariable |
void |
loadToStack(KernelProgramBlock block)
Push current to a stack of specify block
|
void |
setScopeLogicVar(ScopeLogicVariable scopeLogicVar)
Set the
ScopeLogicVariable |
void |
setVariableCompileOrder(int complieOrder)
Set the compile order
|
asArgument, field, getFormerType, getModifiers, getName, toStringclone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, waitgetFormerType, getModifiers, getNameprotected ScopeLogicVariable scopeLogicVar
public LocalVariable(VarMeta lve)
public boolean availableFor(AbstractOperator operator)
IVariable
int i = 10;
if(i % 2 == 0) {
int j = 100;
System.out.println(i);
} else {
System.out.println(j);
}
The preceding code will be get an error cause by variable j is not
available for the second method call operator.availableFor 在接口中 IVariablepublic void loadToStack(KernelProgramBlock block)
PushStackableloadToStack 在接口中 PushStackablepublic AClass getResultType()
getResultType 在接口中 IParampublic void setScopeLogicVar(ScopeLogicVariable scopeLogicVar)
ScopeLogicVariablescopeLogicVar - public ScopeLogicVariable getScopeLogicVar()
ScopeLogicVariablepublic void setVariableCompileOrder(int complieOrder)
complieOrder - compile orderCopyright © 2015. All rights reserved.