Package soot.toDex
Class ExprVisitor
- java.lang.Object
-
- soot.toDex.ExprVisitor
-
- All Implemented Interfaces:
ExprSwitch,Switch
public class ExprVisitor extends Object implements ExprSwitch
A visitor that builds a list of instructions from the Jimple expressions it visits.
UseSwitchable#apply(soot.util.Switch)with this visitor to add statements. These are added to the instructions in theStmtVisitor.
If the expression is part of an assignment or an if statement, usesetDestinationReg(Register)andsetTargetForOffset(Stmt), respectively.- See Also:
StmtVisitor
-
-
Field Summary
Fields Modifier and Type Field Description protected ConstantVisitorconstantVprotected RegisterdestinationRegprotected StmtorigStmtprotected RegisterAllocatorregAllocprotected StmtVisitorstmtVprotected StmttargetForOffset
-
Constructor Summary
Constructors Constructor Description ExprVisitor(StmtVisitor stmtV, ConstantVisitor constantV, RegisterAllocator regAlloc)
-
Method Summary
-
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
Methods inherited from interface soot.jimple.ExprSwitch
caseCheckedAddExpr, caseCheckedCastExpr, caseCheckedMulExpr, caseCheckedSubExpr
-
-
-
-
Field Detail
-
stmtV
protected StmtVisitor stmtV
-
constantV
protected ConstantVisitor constantV
-
regAlloc
protected RegisterAllocator regAlloc
-
destinationReg
protected Register destinationReg
-
targetForOffset
protected Stmt targetForOffset
-
origStmt
protected Stmt origStmt
-
-
Constructor Detail
-
ExprVisitor
public ExprVisitor(StmtVisitor stmtV, ConstantVisitor constantV, RegisterAllocator regAlloc)
-
-
Method Detail
-
setDestinationReg
public void setDestinationReg(Register destinationReg)
-
setOrigStmt
public void setOrigStmt(Stmt stmt)
-
setTargetForOffset
public void setTargetForOffset(Stmt targetForOffset)
-
defaultCase
public void defaultCase(Object o)
- Specified by:
defaultCasein interfaceExprSwitch
-
caseDynamicInvokeExpr
public void caseDynamicInvokeExpr(DynamicInvokeExpr v)
- Specified by:
caseDynamicInvokeExprin interfaceExprSwitch
-
caseSpecialInvokeExpr
public void caseSpecialInvokeExpr(SpecialInvokeExpr sie)
- Specified by:
caseSpecialInvokeExprin interfaceExprSwitch
-
caseVirtualInvokeExpr
public void caseVirtualInvokeExpr(VirtualInvokeExpr vie)
- Specified by:
caseVirtualInvokeExprin interfaceExprSwitch
-
caseInterfaceInvokeExpr
public void caseInterfaceInvokeExpr(InterfaceInvokeExpr iie)
- Specified by:
caseInterfaceInvokeExprin interfaceExprSwitch
-
caseStaticInvokeExpr
public void caseStaticInvokeExpr(StaticInvokeExpr sie)
- Specified by:
caseStaticInvokeExprin interfaceExprSwitch
-
caseAddExpr
public void caseAddExpr(AddExpr ae)
- Specified by:
caseAddExprin interfaceExprSwitch
-
caseSubExpr
public void caseSubExpr(SubExpr se)
- Specified by:
caseSubExprin interfaceExprSwitch
-
caseMulExpr
public void caseMulExpr(MulExpr me)
- Specified by:
caseMulExprin interfaceExprSwitch
-
caseDivExpr
public void caseDivExpr(DivExpr de)
- Specified by:
caseDivExprin interfaceExprSwitch
-
caseRemExpr
public void caseRemExpr(RemExpr re)
- Specified by:
caseRemExprin interfaceExprSwitch
-
caseAndExpr
public void caseAndExpr(AndExpr ae)
- Specified by:
caseAndExprin interfaceExprSwitch
-
caseOrExpr
public void caseOrExpr(OrExpr oe)
- Specified by:
caseOrExprin interfaceExprSwitch
-
caseXorExpr
public void caseXorExpr(XorExpr xe)
- Specified by:
caseXorExprin interfaceExprSwitch
-
caseShlExpr
public void caseShlExpr(ShlExpr sle)
- Specified by:
caseShlExprin interfaceExprSwitch
-
caseShrExpr
public void caseShrExpr(ShrExpr sre)
- Specified by:
caseShrExprin interfaceExprSwitch
-
caseUshrExpr
public void caseUshrExpr(UshrExpr usre)
- Specified by:
caseUshrExprin interfaceExprSwitch
-
caseEqExpr
public void caseEqExpr(EqExpr ee)
- Specified by:
caseEqExprin interfaceExprSwitch
-
caseGeExpr
public void caseGeExpr(GeExpr ge)
- Specified by:
caseGeExprin interfaceExprSwitch
-
caseGtExpr
public void caseGtExpr(GtExpr ge)
- Specified by:
caseGtExprin interfaceExprSwitch
-
caseLeExpr
public void caseLeExpr(LeExpr le)
- Specified by:
caseLeExprin interfaceExprSwitch
-
caseLtExpr
public void caseLtExpr(LtExpr le)
- Specified by:
caseLtExprin interfaceExprSwitch
-
caseNeExpr
public void caseNeExpr(NeExpr ne)
- Specified by:
caseNeExprin interfaceExprSwitch
-
caseCmpExpr
public void caseCmpExpr(CmpExpr v)
- Specified by:
caseCmpExprin interfaceExprSwitch
-
caseCmpgExpr
public void caseCmpgExpr(CmpgExpr v)
- Specified by:
caseCmpgExprin interfaceExprSwitch
-
caseCmplExpr
public void caseCmplExpr(CmplExpr v)
- Specified by:
caseCmplExprin interfaceExprSwitch
-
caseLengthExpr
public void caseLengthExpr(LengthExpr le)
- Specified by:
caseLengthExprin interfaceExprSwitch
-
caseNegExpr
public void caseNegExpr(NegExpr ne)
- Specified by:
caseNegExprin interfaceExprSwitch
-
caseInstanceOfExpr
public void caseInstanceOfExpr(InstanceOfExpr ioe)
- Specified by:
caseInstanceOfExprin interfaceExprSwitch
-
caseCastExpr
public void caseCastExpr(CastExpr ce)
- Specified by:
caseCastExprin interfaceExprSwitch
-
caseNewArrayExpr
public void caseNewArrayExpr(NewArrayExpr nae)
- Specified by:
caseNewArrayExprin interfaceExprSwitch
-
caseNewMultiArrayExpr
public void caseNewMultiArrayExpr(NewMultiArrayExpr nmae)
- Specified by:
caseNewMultiArrayExprin interfaceExprSwitch
-
caseNewExpr
public void caseNewExpr(NewExpr ne)
- Specified by:
caseNewExprin interfaceExprSwitch
-
getLastInvokeInstructionPosition
public int getLastInvokeInstructionPosition()
-
-