|
|||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||||
java.lang.Object | +--jreversepro.runtime.JSymbolTable
JSymbolTable - Symbol Table of a method containing local variables only.
| Field Summary | |
static int |
ARG_INDEX
Index of the argument into the symbol table. |
| Fields inherited from interface jreversepro.common.KeyWords |
ANY, BOOLEAN, BREAK, BYTE, CASE, CHAR, CLASS, CLASS_STRING, CLINIT, CLOSE_BRACKET, COND_AND, COND_NOT, COND_OR, CONTINUE, DEFAULT, DEFAULT_PACKAGE, DOUBLE, EQUALTO, FALSE, FLOAT, FOREIGN_CLASS, FOREIGN_OBJ, GOTO, INIT, INSTANCEOF, INT, INTERFACE, JVM_BOOLEAN, JVM_CHAR, JVM_VOID, LANG_OBJECT, LENGTH, LONG, NEW, NULL, OPEN_BRACKET, OPR_EQ, OPR_GE, OPR_GT, OPR_LE, OPR_LT, OPR_NE, OPR_NOT, REFERENCE, RET_ADDR, RETURN, SHORT, SPACE, STATIC, SUPER, SWITCH, THIS, THISCLASS, THROW, TRUE, VOID |
| Constructor Summary | |
JSymbolTable(JMethod rhsMethod,
JImport imports)
|
|
| Method Summary | |
void |
addReference(int aVarIndex,
java.lang.String aDatatype,
int aIndex)
This method primarily keeps track of the last line that references the variable represented by aVarIndex and the datatype aDataType. |
void |
assignDataType(int aVarIndex,
java.lang.String aDatatype,
int aVarStore,
boolean aDeclared)
Adds a new datatype to the symboltable dynamically . |
java.lang.String |
declare(int aVarIndex,
int aInsIndex)
Declares a variable represented by aVarIndex and aInsIndex and returns its datatype. |
java.util.List |
defineVariable(int endOfBranch)
Given the endOfBranch of a branch, this method returns a List of strings, of the form |
java.lang.String |
getDataType(int aVarIndex,
int aInsIndex)
|
static java.util.List |
getKeyWordsList()
|
int |
getMaxSymbols()
|
java.lang.String |
getName(int aVarIndex,
int aInsIndex)
|
java.lang.String |
toString()
|
void |
touchVariable(java.lang.String aVarName,
java.lang.String aNewType)
Touch variable is basically assigning a new datatype in place of the old one. |
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
| Field Detail |
public static final int ARG_INDEX
| Constructor Detail |
public JSymbolTable(JMethod rhsMethod,
JImport imports)
rhsMethod - Method for which this symbol table
is generated and used.imports - ImportedClasses by this class.| Method Detail |
public int getMaxSymbols()
public void assignDataType(int aVarIndex,
java.lang.String aDatatype,
int aVarStore,
boolean aDeclared)
aVarIndex - variable index ,aDatatype - DatatypeaVarStore - variable store index.aDeclared - If variable is declared.
public void addReference(int aVarIndex,
java.lang.String aDatatype,
int aIndex)
aVarIndex - variable index ,aDatatype - DatatypeaIndex - Refernced index.public java.util.List defineVariable(int endOfBranch)
endOfBranch - PC when branch ends.
public void touchVariable(java.lang.String aVarName,
java.lang.String aNewType)
aVarName - Variable nameaNewType - New Datatype
public java.lang.String getName(int aVarIndex,
int aInsIndex)
throws RevEngineException
aVarIndex - Index of local variable into symbol table.aInsIndex - Index of instruction into bytecode array
of method.
RevEngineException - Thrown in case of any problem.
public java.lang.String getDataType(int aVarIndex,
int aInsIndex)
throws RevEngineException
aVarIndex - Index of local variable into symbol table.aInsIndex - Index of instruction into bytecode array
of method.
RevEngineException - Thrown in case of any problem.
public final java.lang.String declare(int aVarIndex,
int aInsIndex)
throws RevEngineException
aVarIndex - Index of local variable into symbol table.aInsIndex - Index of instruction into bytecode array
of method.
RevEngineException - Thrown in case of any problem.public static java.util.List getKeyWordsList()
public java.lang.String toString()
toString in class java.lang.Object
|
|||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||||