jreversepro.runtime
Class JLocalEntry

java.lang.Object
  extended by jreversepro.runtime.JLocalEntry

public class JLocalEntry
extends java.lang.Object

LocalEntry is a entry in the SymbolTable.

Author:
Karthik Kumar

Constructor Summary
JLocalEntry(int aVarIndex, int aStoreIndex, java.lang.String datatype, java.lang.String aName, boolean aDeclared)
           
 
Method Summary
 void declareVariable()
          Declare this local variable.
 boolean equals(java.lang.Object obj)
           
 java.lang.String getDeclarationType()
           
 int getLastReferredIndex()
           
 java.lang.String getName()
           
 int getStoreIndex()
           
 int getVarIndex()
           
 int hashCode()
           
 boolean isDeclared()
           
 boolean reassignType(java.lang.String datatype)
          In case a variable is not declared, this reassigns the type of the variable.
 void setDeclarationType(java.lang.String aType)
           
 void setLastReferredIndex(int index)
          Sets the last ReferredIndex of this line.
 void setName(java.lang.String name)
          Setter method for name,
 java.lang.String toString()
           
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
 

Constructor Detail

JLocalEntry

public JLocalEntry(int aVarIndex,
                   int aStoreIndex,
                   java.lang.String datatype,
                   java.lang.String aName,
                   boolean aDeclared)
Parameters:
aVarIndex - Variable Index into the Symbol Table
aStoreIndex - Opcode index into the method bytecode array when this variable stored / first initialized.
datatype - datatype of the variable
aName - Name of the variable.
aDeclared - If this variable is declared or not.
Method Detail

setName

public void setName(java.lang.String name)
Setter method for name,

Parameters:
name - Name to be assigned.

getName

public java.lang.String getName()
Returns:
Returns the name of the variable.

getStoreIndex

public int getStoreIndex()
Returns:
Returns the store index of this variable,

getVarIndex

public int getVarIndex()
Returns:
Returns Variable Index into the bytecode array for this method.

setLastReferredIndex

public void setLastReferredIndex(int index)
Sets the last ReferredIndex of this line.

Parameters:
index - Last ReferredIndex of the variable.

getLastReferredIndex

public int getLastReferredIndex()
Returns:
Returns the last referred index of this variable.

isDeclared

public boolean isDeclared()
Returns:
Returns if the variable is declared/not.

declareVariable

public void declareVariable()
Declare this local variable.


getDeclarationType

public java.lang.String getDeclarationType()
Returns:
Returns the declaration type.

setDeclarationType

public void setDeclarationType(java.lang.String aType)
Parameters:
aType - Declaration Type to be set.

reassignType

public boolean reassignType(java.lang.String datatype)
In case a variable is not declared, this reassigns the type of the variable.

Parameters:
datatype - New datatype to be reassigned.
Returns:
Returns true, if datatype is reassigned, false if no change made to datatype and re-assignation ignored.

equals

public boolean equals(java.lang.Object obj)
Overrides:
equals in class java.lang.Object
Parameters:
obj - Object to be compared.
Returns:
if both object are equal. false, otherwise.

hashCode

public int hashCode()
Overrides:
hashCode in class java.lang.Object
Returns:
Hashcode of this method.

toString

public java.lang.String toString()
Overrides:
toString in class java.lang.Object
Returns:
Returns the string fields form, add all references.


Submit Feedback to akkumar@users.sourceforge.net