public class ClassScope extends Scope
Constructor and Description |
---|
ClassScope(InterpretedClassDef cl) |
Modifier and Type | Method and Description |
---|---|
InterpretedClassDef |
addClass(Location location,
java.lang.String name,
java.lang.String parentName,
java.util.ArrayList<java.lang.String> ifaceList,
int index,
boolean isTop)
Adds a class
|
void |
addClassField(StringValue name,
Expr value,
FieldVisibility visibility,
java.lang.String comment)
Adds a value
|
protected void |
addConditionalClass(InterpretedClassDef def)
Adds a conditional class.
|
void |
addConditionalFunction(StringValue name,
Function function)
Adds a function defined in a conditional block.
|
void |
addConstant(StringValue name,
Expr value)
Adds a constant value
|
void |
addFunction(StringValue name,
Function function,
boolean isTop)
Adds a function.
|
void |
addStaticClassField(StringValue name,
Expr value,
java.lang.String comment)
Adds a static value
|
boolean |
isAbstract()
Returns true for an abstract scope, e.g.
|
boolean |
isClass()
Returns true if scope is within a class.
|
addConditionalFunction, addConstant, getParent, isFunction, isGlobal, isIf, isSwitchCase, isTry, isWhile
public ClassScope(InterpretedClassDef cl)
public boolean isClass()
public boolean isAbstract()
isAbstract
in class Scope
public void addFunction(StringValue name, Function function, boolean isTop)
addFunction
in class Scope
public void addConditionalFunction(StringValue name, Function function)
addConditionalFunction
in class Scope
public void addClassField(StringValue name, Expr value, FieldVisibility visibility, java.lang.String comment)
public void addStaticClassField(StringValue name, Expr value, java.lang.String comment)
public void addConstant(StringValue name, Expr value)
public InterpretedClassDef addClass(Location location, java.lang.String name, java.lang.String parentName, java.util.ArrayList<java.lang.String> ifaceList, int index, boolean isTop)
protected void addConditionalClass(InterpretedClassDef def)
Scope
addConditionalClass
in class Scope