|
|||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||||
java.lang.Object | +--jreversepro.revengine.JBranchEntry
JBranchEntry refers to a single conditional BranchEntry only.
| 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 |
| Fields inherited from interface jreversepro.revengine.BranchConstants |
TYPE_BRANCH, TYPE_CASE, TYPE_CATCH, TYPE_CATCH_ANY, TYPE_DO_WHILE, TYPE_ELSE, TYPE_ELSE_IF, TYPE_GOTO, TYPE_IF, TYPE_INVALID, TYPE_JSR, TYPE_RET, TYPE_SWITCH, TYPE_SYNC, TYPE_TRY, TYPE_TRY_ANY, TYPE_WHILE |
| Fields inherited from interface jreversepro.runtime.OperandConstants |
L_ADD, L_BITAND, L_BITOR, L_BITXOR, L_CAST, L_COMMA, L_DIV, L_EVAL, L_INDEX, L_LOGAND, L_LOGEQ, L_LOGIOF, L_LOGNEQ, L_LOGOR, L_LOGREL, L_MOD, L_MUL, L_REF, L_SHIFT, L_SUB, L_TERN, L_UNARY, VALUE |
| Constructor Summary | |
JBranchEntry(JMethod method,
int startPc,
int targetPc,
int type)
|
|
JBranchEntry(JMethod method,
int startPc,
int nextPc,
int targetPc,
int type,
java.lang.String opr1,
java.lang.String opr2,
java.lang.String operator)
|
|
| Method Summary | |
boolean |
appendEndBlockStmt(JDecompiler decomp,
JOperandStack jos)
Appends end block statement for a branch entry. |
void |
appendStartBlockStmtX(JDecompiler decomp)
Append the code for the beginning of a block |
void |
complementOperator()
Complements the conditional operator of the branch |
void |
convertToWhile()
This is invoked under the following circumstances. |
boolean |
doesContain(int aPc)
Returns if the given Pc is enclosed in the mentioned block |
boolean |
doesStartWith(int rhsStartPc)
This method checks if this particular branch block starts with the given Pc. |
int |
getEndBlockPc()
|
java.lang.String |
getExpression()
Trims the expression for a condition here. |
int |
getNextPc()
|
java.lang.String |
getOpr1()
|
int |
getStartBlockPc()
|
int |
getStartExecPc()
|
int |
getStartPc()
|
int |
getTargetPc()
|
int |
getType()
|
boolean |
independent()
Lets us know if the block is independent. |
boolean |
isWhile()
Returns if the branch mentioned can be a TYPE_WHILE. |
void |
resetWrittenFlag()
Resets the written flag |
void |
rewriteCondition(JBranchEntry nextEntry,
java.lang.String conditionType,
boolean complement)
This merges the current condition represented by the current JBranchEntry. |
void |
setEndBlockPc(int aNewPc)
Sets the end pc of this block. |
void |
setNextPc(int nextPc)
Setter method for NextPc. |
void |
setOpr1(java.lang.String opr1)
|
void |
setOpr2(java.lang.String opr2)
|
void |
setStartPc(int startPc)
|
void |
setTargetPc(int targetPc)
|
void |
setType(int type)
Setter method for type. |
void |
setWrittenFlag()
Sets the written flag. |
java.lang.String |
toString()
|
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
| Constructor Detail |
public JBranchEntry(JMethod method,
int startPc,
int targetPc,
int type)
method - Method to which this branch entry belongs to.startPc - StartPctargetPc - TargetPctype - Type of the branch
public JBranchEntry(JMethod method,
int startPc,
int nextPc,
int targetPc,
int type,
java.lang.String opr1,
java.lang.String opr2,
java.lang.String operator)
method - Method to which this branch entry belongs to.startPc - StartPcnextPc - NextPctargetPc - TargetPctype - Type of the branchopr1 - Operand 1opr2 - Operand 2operator - Operator Comparison of the branch.| Method Detail |
public void setWrittenFlag()
public void resetWrittenFlag()
public boolean isWhile()
public int getStartPc()
public int getTargetPc()
public int getNextPc()
public final int getType()
public java.lang.String getOpr1()
public void setNextPc(int nextPc)
nextPc - Value for the nextPc.public void setTargetPc(int targetPc)
targetPc - TargetPC of the block.public void setStartPc(int startPc)
startPc - StartPc of the branch.
Setter method for startPc.public void setType(int type)
type - Type of the branch.public void setOpr1(java.lang.String opr1)
opr1 - Operand 1.
Setter method for operand 1.public void setOpr2(java.lang.String opr2)
opr2 - Operand 2.
Setter method for operand 2.public void convertToWhile()
public void complementOperator()
public boolean doesStartWith(int rhsStartPc)
throws RevEngineException
rhsStartPc - StartPc that is to be checked if a block
starts there.
RevEngineException - Thrown when any error occurs.public boolean independent()
public boolean doesContain(int aPc)
throws RevEngineException
aPc - the Pc for which the location is to be mentioned.
RevEngineException - Thrown in case any error occurs while
performing this operation.
public int getStartBlockPc()
throws RevEngineException
RevEngineException - Thrown in case of any error while geting
start block Pc.
public int getEndBlockPc()
throws RevEngineException
RevEngineException - Thrown in case there of any
problem getting End block pc.
public int getStartExecPc()
throws RevEngineException
RevEngineException - Thrown in case any error occurs.public final void appendStartBlockStmtX(JDecompiler decomp)
decomp - Reference to decempiler.
public final boolean appendEndBlockStmt(JDecompiler decomp,
JOperandStack jos)
decomp - Decompiler reference.jos - Java Operand Stack reference.
public void rewriteCondition(JBranchEntry nextEntry,
java.lang.String conditionType,
boolean complement)
nextEntry - Next Condition that is to be merged with
the current condition.conditionType - If OR or AND.complement - if the current expression needs to be
complemented.public void setEndBlockPc(int aNewPc)
aNewPc - New Pc that is to be set as the
end of the blockpublic java.lang.String getExpression()
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 | ||||||||||