public class LookUpTable extends Object
Constructor and Description |
---|
LookUpTable()
Initializes this table.
|
Modifier and Type | Method and Description |
---|---|
void |
addClassVariable(String variableName,
String variableType)
Adds a new class variable in this look up table.
|
void |
addMethodVariable(String variableName,
String variableType)
Adds a new method variable in this look up table.
|
void |
enterClass()
Method that is called when entering a new class.
|
void |
enterClass(String superClass)
Method that is called when entering a new class.
|
void |
enterMethod()
Method that is called when entering a new method.
|
String |
getSuperClass()
Returns the super class of the class for which the look up table is created.
|
String |
getTypeOfVariable(String variableName)
Returns the type of a variable given its name.
|
String |
toString()
Returns a string representation of this look up table.
|
public void enterClass()
public void enterClass(String superClass)
superClass
- the super class of the class that is entered.public void enterMethod()
public void addClassVariable(String variableName, String variableType)
variableName
- the name of the variable to be added.variableType
- the type of the variable that is added.public void addMethodVariable(String variableName, String variableType)
variableName
- the name of the variable to be added.variableType
- the type of the variable that is added.public String getTypeOfVariable(String variableName)
variableName
- the name of the variable."___"
if the variable does not exist.public String getSuperClass()
Copyright © 2017. All rights reserved.