public class GlobalScope extends Scope
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
|
protected void |
addConditionalClass(InterpretedClassDef def)
Adds a class
|
protected void |
addConditionalFunction(StringValue name,
Function function)
Adds a function defined in a conditional block.
|
void |
addFunction(StringValue name,
Function function,
boolean isTop)
Adds a function.
|
java.util.ArrayList<InterpretedClassDef> |
getClassList()
Returns the list of defined classes.
|
java.util.HashMap<java.lang.String,InterpretedClassDef> |
getClassMap()
Returns the class map.
|
java.util.HashMap<java.lang.String,InterpretedClassDef> |
getConditionalClassMap()
Returns the conditional class map.
|
java.util.HashMap<StringValue,Function> |
getConditionalFunctionMap()
Returns the conditional function map.
|
java.util.ArrayList<Function> |
getFunctionList()
Returns the function list.
|
java.util.HashMap<StringValue,Function> |
getFunctionMap()
Returns the function map.
|
boolean |
isGlobal()
Returns true if scope is global.
|
addConditionalFunction, addConstant, getParent, isAbstract, isClass, isFunction, isIf, isSwitchCase, isTry, isWhile
public boolean isGlobal()
Scope
public void addFunction(StringValue name, Function function, boolean isTop)
addFunction
in class Scope
protected void addConditionalFunction(StringValue name, Function function)
Scope
addConditionalFunction
in class Scope
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)
addConditionalClass
in class Scope
public java.util.HashMap<StringValue,Function> getFunctionMap()
public java.util.ArrayList<Function> getFunctionList()
public java.util.HashMap<StringValue,Function> getConditionalFunctionMap()
public java.util.HashMap<java.lang.String,InterpretedClassDef> getClassMap()
public java.util.ArrayList<InterpretedClassDef> getClassList()
public java.util.HashMap<java.lang.String,InterpretedClassDef> getConditionalClassMap()