jreversepro.revengine
Class JCaseEntry

java.lang.Object
  extended by jreversepro.revengine.JCaseEntry
All Implemented Interfaces:
KeyWords

public class JCaseEntry
extends java.lang.Object
implements KeyWords

JCaseEntry is the abstract representation of a case entry

Author:
Karthik Kumar

Field Summary
 
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
JCaseEntry()
          Empty constructor.
JCaseEntry(java.lang.String name, int targetPc)
           
 
Method Summary
 void addValue(java.lang.String name)
          Adds another case target.
 java.lang.String disAssemble()
          Returns a string with the case targets and the correpoding branch PCs listed.
 int getEndTarget()
           
 int getTarget()
           
 java.util.List<java.lang.String> getValues()
           
 void setEndTarget(int endTarget)
          Setter method for endTarget.
 void setTarget(int targetPc)
          Setter method for TargetPc
 java.lang.String toString()
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

JCaseEntry

public JCaseEntry()
Empty constructor.


JCaseEntry

public JCaseEntry(java.lang.String name,
                  int targetPc)
Parameters:
name - Name of the case target.
targetPc - PC of the corresponding handler for this case target.
Method Detail

addValue

public void addValue(java.lang.String name)
Adds another case target.

Parameters:
name - Name of the case target.

getValues

public java.util.List<java.lang.String> getValues()
Returns:
Returns the List of case targets. Members are 'String'.

getTarget

public int getTarget()
Returns:
Returns the targetPc of the beginning branch

setTarget

public void setTarget(int targetPc)
Setter method for TargetPc

Parameters:
targetPc - TargetPc

getEndTarget

public int getEndTarget()
Returns:
Returns End of the target for this case block.

setEndTarget

public void setEndTarget(int endTarget)
Setter method for endTarget.

Parameters:
endTarget - End Target for this case group block.

disAssemble

public java.lang.String disAssemble()
Returns a string with the case targets and the correpoding branch PCs listed.

Returns:
Disassembled piece of code.

toString

public java.lang.String toString()
Overrides:
toString in class java.lang.Object
Returns:
Returns a Stringified form of the class.


Submit Feedback to akkumar@users.sourceforge.net