Package sootup.core.jimple
Class Jimple
java.lang.Object
sootup.core.jimple.Jimple
- Direct Known Subclasses:
JavaJimple
The Jimple class contains all the constructors for the components of the Jimple grammar for the
Jimple body.
Immediate -> Local | Constant
RValue -> Local | Constant | ConcreteRef | Expr
Variable -> Local | ArrayRef | InstanceFieldRef | StaticFieldRef
-
Field Summary
Modifier and TypeFieldDescriptionstatic final String
static final String
static final String
static final String
static final String
static final String
static final String
static final String
static final String
static final String
static final String
static final String
static final String
static final String
static final String
static final String
static final String
static final String
static final String
static final String
static final String
static final String
static final String
static final String
static final String
static final String
static final String
static final String
static final String
static final String
static final String
static final String
static final String
static final String
static final String
static final String
static final String
static final String
static final String
static final String
static final String
static final String
static final String
static final String
static final String
static final String
static final String
static final String
static final String
static final String
static final String
static final String
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionstatic String
Escapes reserved Jimple keywords e.g.abstract IdentifierFactory
Returns a list of keywords for Jimple.static JAddExpr
newAddExpr
(Immediate op1, Immediate op2) Constructs a AddExpr(Immediate, Immediate) grammar chunk.static JAndExpr
newAndExpr
(Immediate op1, Immediate op2) Constructs a AndExpr(Immediate, Immediate) grammar chunk.newArrayRef
(Local base, Immediate index) Constructs a ArrayRef(Local, Immediate) grammar chunk.static JAssignStmt
newAssignStmt
(LValue variable, Value rvalue, StmtPositionInfo posInfo) Constructs a AssignStmt(Variable, RValue) grammar chunk.static JBreakpointStmt
newBreakpointStmt
(StmtPositionInfo posInfo) Constructs a BreakpointStmt() grammar chunk.static JCastExpr
newCastExpr
(Immediate op1, Type t) Constructs a CastExpr(Immediate, Type) grammar chunk.abstract JCaughtExceptionRef
Constructs a CaughtExceptionRef() grammar chunk.static JCmpExpr
newCmpExpr
(Immediate op1, Immediate op2) Constructs a CmpExpr(Immediate, Immediate) grammar chunk.static JCmpgExpr
newCmpgExpr
(Immediate op1, Immediate op2) Constructs a CmpgExpr(Immediate, Immediate) grammar chunk.static JCmplExpr
newCmplExpr
(Immediate op1, Immediate op2) Constructs a CmplExpr(Immediate, Immediate) grammar chunk.static JDivExpr
newDivExpr
(Immediate op1, Immediate op2) Constructs a DivExpr(Immediate, Immediate) grammar chunk.static JDynamicInvokeExpr
newDynamicInvokeExpr
(MethodSignature bootstrapMethodSignature, List<Immediate> bootstrapArgs, MethodSignature methodSignature, int tag, List<Immediate> args) Constructs a NewDynamicInvokeExpr(SootMethod bootstrapMethodSignature, List bootstrapArgs, SootMethod methodSignature, List args) grammar chunk.static JDynamicInvokeExpr
newDynamicInvokeExpr
(MethodSignature bootstrapMethodSignature, List<Immediate> bootstrapArgs, MethodSignature methodSignature, List<Immediate> args) Constructs a NewDynamicInvokeExpr(SootMethod bootstrapMethodSignature, List bootstrapArgs, SootMethod methodSignature, List args) grammar chunk.static JEnterMonitorStmt
newEnterMonitorStmt
(Immediate op, StmtPositionInfo posInfo) Constructs a EnterMonitorStmt(Immediate) grammar chunk.static JEqExpr
Constructs a EqExpr(Immediate, Immediate) grammar chunk.static JExitMonitorStmt
newExitMonitorStmt
(Immediate op, StmtPositionInfo posInfo) Constructs a ExitMonitorStmt(Immediate) grammar chunk.static JGeExpr
Constructs a GeExpr(Immediate, Immediate) grammar chunk.static JGotoStmt
newGotoStmt
(StmtPositionInfo posInfo) Constructs a GotoStmt(Stmt) grammar chunk.static JGtExpr
Constructs a GtExpr(Immediate, Immediate) grammar chunk.static <L extends IdentityRef>
JIdentityStmtnewIdentityStmt
(Local local, L identityRef, StmtPositionInfo posInfo) Constructs a IdentityStmt(Local, IdentityRef) grammar chunk.static JIfStmt
newIfStmt
(AbstractConditionExpr condition, StmtPositionInfo posInfo) Constructs a IfStmt(Condition, Stmt) grammar chunk.static JInstanceFieldRef
newInstanceFieldRef
(Local base, FieldSignature f) Constructs a InstanceFieldRef(Local, FieldSignature) grammar chunk.static JInstanceOfExpr
newInstanceOfExpr
(Immediate op1, Type t) Constructs a InstanceOfExpr(Immediate, Type) grammar chunk.static JInterfaceInvokeExpr
newInterfaceInvokeExpr
(Local base, MethodSignature method) static JInterfaceInvokeExpr
newInterfaceInvokeExpr
(Local base, MethodSignature method, List<Immediate> args) Constructs a NewInterfaceInvokeExpr(Local base, SootMethod method, List of Immediate) grammar chunk.static JInterfaceInvokeExpr
newInterfaceInvokeExpr
(Local base, MethodSignature method, Immediate arg) static JInvokeStmt
newInvokeStmt
(AbstractInvokeExpr op, StmtPositionInfo posInfo) Constructs a InvokeStmt(InvokeExpr) grammar chunk.static JLeExpr
Constructs a LeExpr(Immediate, Immediate) grammar chunk.static JLengthExpr
Constructs a LengthExpr(Immediate) grammar chunk.static Local
Constructs a Local with the given name and type.static JSwitchStmt
newLookupSwitchStmt
(Immediate key, List<IntConstant> lookupValues, StmtPositionInfo posInfo) Constructs a LookupSwitchStmt(Immediate, List of Immediate, List of Stmt, Stmt) grammar chunk.static JLtExpr
Constructs a LtExpr(Immediate, Immediate) grammar chunk.static JMulExpr
newMulExpr
(Immediate op1, Immediate op2) Constructs a MulExpr(Immediate, Immediate) grammar chunk.static JNeExpr
Constructs a NeExpr(Immediate, Immediate) grammar chunk.static JNegExpr
newNegExpr
(Immediate op) Constructs a NegExpr(Immediate, Immediate) grammar chunk.newNewArrayExpr
(Type type, Immediate size) Constructs a NewArrayExpr(Type, Immediate) grammar chunk.static JNewExpr
newNewExpr
(ClassType type) Constructs a NewExpr(RefType) grammar chunk.static JNewMultiArrayExpr
newNewMultiArrayExpr
(ArrayType type, List<Immediate> sizes) static JNopStmt
newNopStmt
(StmtPositionInfo posInfo) Constructs a NopStmt() grammar chunk.static JOrExpr
Constructs a OrExpr(Immediate, Immediate) grammar chunk.static JParameterRef
newParameterRef
(Type paramType, int number) Constructs a ParameterRef(SootMethod, int) grammar chunk.static JPhiExpr
newPhiExpr
(List<Local> args, Map<Local, BasicBlock<?>> argToBlock) static JRemExpr
newRemExpr
(Immediate op1, Immediate op2) Constructs a RemExpr(Immediate, Immediate) grammar chunk.static JRetStmt
newRetStmt
(Immediate stmtAddress, StmtPositionInfo posInfo) Constructs a RetStmt(Local) grammar chunk.static JReturnStmt
newReturnStmt
(Immediate op, StmtPositionInfo posInfo) Constructs a ReturnStmt(Immediate) grammar chunk.static JReturnVoidStmt
newReturnVoidStmt
(StmtPositionInfo posInfo) Constructs a ReturnVoidStmt() grammar chunk.static JShlExpr
newShlExpr
(Immediate op1, Immediate op2) Constructs a ShlExpr(Immediate, Immediate) grammar chunk.static JShrExpr
newShrExpr
(Immediate op1, Immediate op2) Constructs a ShrExpr(Immediate, Immediate) grammar chunk.static JSpecialInvokeExpr
newSpecialInvokeExpr
(Local base, MethodSignature method) static JSpecialInvokeExpr
newSpecialInvokeExpr
(Local base, MethodSignature method, List<Immediate> args) Constructs a NewSpecialInvokeExpr(Local base, SootMethod method, List of Immediate) grammar chunk.static JSpecialInvokeExpr
newSpecialInvokeExpr
(Local base, MethodSignature method, Immediate arg) static JStaticFieldRef
Constructs a JStaticFieldRef(FieldSignature) grammar chunk.static JStaticInvokeExpr
newStaticInvokeExpr
(MethodSignature method) static JStaticInvokeExpr
newStaticInvokeExpr
(MethodSignature method, List<Immediate> args) Constructs a NewStaticInvokeExpr(ArrayType, List of Immediate) grammar chunk.static JStaticInvokeExpr
newStaticInvokeExpr
(MethodSignature method, Immediate arg) static JSubExpr
newSubExpr
(Immediate op1, Immediate op2) Constructs a SubExpr(Immediate, Immediate) grammar chunk.static JSwitchStmt
newTableSwitchStmt
(Immediate key, int lowIndex, int highIndex, StmtPositionInfo posInfo) Constructs a TableSwitchStmt(Immediate, int, int, List of Stmt, Stmt) grammar chunk.static JThisRef
Constructs a ThisRef(ClassType) grammar chunk.static JThrowStmt
newThrowStmt
(Immediate op, StmtPositionInfo posInfo) Constructs a ThrowStmt(Immediate) grammar chunk.static Trap
static JUshrExpr
newUshrExpr
(Immediate op1, Immediate op2) Constructs a UshrExpr(Immediate, Immediate) grammar chunk.static JVirtualInvokeExpr
newVirtualInvokeExpr
(Local base, MethodSignature method) static JVirtualInvokeExpr
newVirtualInvokeExpr
(Local base, MethodSignature method, List<Immediate> args) Constructs a NewVirtualInvokeExpr(Local base, SootMethod method, List of Immediate) grammar chunk.static JVirtualInvokeExpr
newVirtualInvokeExpr
(Local base, MethodSignature method, Immediate arg) static JXorExpr
newXorExpr
(Immediate op1, Immediate op2) Constructs a XorExpr(Immediate, Immediate) grammar chunk.static String
-
Field Details
-
NEWARRAY
- See Also:
-
NEWMULTIARRAY
- See Also:
-
NOP
- See Also:
-
RET
- See Also:
-
SPECIALINVOKE
- See Also:
-
DYNAMICINVOKE
- See Also:
-
STATICINVOKE
- See Also:
-
VIRTUALINVOKE
- See Also:
-
CMP
- See Also:
-
CMPG
- See Also:
-
CMPL
- See Also:
-
ENTERMONITOR
- See Also:
-
EXITMONITOR
- See Also:
-
INTERFACEINVOKE
- See Also:
-
LENGTHOF
- See Also:
-
NEG
- See Also:
-
IF
- See Also:
-
ABSTRACT
- See Also:
-
CASE
- See Also:
-
CATCH
- See Also:
-
CLASS
- See Also:
-
FINAL
- See Also:
-
NATIVE
- See Also:
-
PUBLIC
- See Also:
-
PROTECTED
- See Also:
-
PRIVATE
- See Also:
-
STATIC
- See Also:
-
SYNCHRONIZED
- See Also:
-
TRANSIENT
- See Also:
-
VOLATILE
- See Also:
-
STRICTFP
- See Also:
-
ENUM
- See Also:
-
ANNOTATION
- See Also:
-
INTERFACE
- See Also:
-
EXTENDS
- See Also:
-
IMPLEMENTS
- See Also:
-
BREAKPOINT
- See Also:
-
DEFAULT
- See Also:
-
GOTO
- See Also:
-
INSTANCEOF
- See Also:
-
NEW
- See Also:
-
RETURN
- See Also:
-
SWITCH
- See Also:
-
THROW
- See Also:
-
THROWS
- See Also:
-
NULL
- See Also:
-
FROM
- See Also:
-
TO
- See Also:
-
WITH
- See Also:
-
TRUE
- See Also:
-
FALSE
- See Also:
-
PHI
- See Also:
-
-
Constructor Details
-
Jimple
public Jimple()
-
-
Method Details
-
jimpleKeywordList
Returns a list of keywords for Jimple. This list has to be in sync with the tokens for the jimple parser. This way StmtPrinter can escape reserved words while serializing if needed. -
escape
Escapes reserved Jimple keywords e.g. used in (Stmt)Printer, necessary in the JimpleParser -
unescape
-
getIdentifierFactory
-
newXorExpr
Constructs a XorExpr(Immediate, Immediate) grammar chunk. -
newUshrExpr
Constructs a UshrExpr(Immediate, Immediate) grammar chunk. -
newSubExpr
Constructs a SubExpr(Immediate, Immediate) grammar chunk. -
newShrExpr
Constructs a ShrExpr(Immediate, Immediate) grammar chunk. -
newShlExpr
Constructs a ShlExpr(Immediate, Immediate) grammar chunk. -
newRemExpr
Constructs a RemExpr(Immediate, Immediate) grammar chunk. -
newOrExpr
Constructs a OrExpr(Immediate, Immediate) grammar chunk. -
newNeExpr
Constructs a NeExpr(Immediate, Immediate) grammar chunk. -
newMulExpr
Constructs a MulExpr(Immediate, Immediate) grammar chunk. -
newLeExpr
Constructs a LeExpr(Immediate, Immediate) grammar chunk. -
newGeExpr
Constructs a GeExpr(Immediate, Immediate) grammar chunk. -
newEqExpr
Constructs a EqExpr(Immediate, Immediate) grammar chunk. -
newDivExpr
Constructs a DivExpr(Immediate, Immediate) grammar chunk. -
newCmplExpr
Constructs a CmplExpr(Immediate, Immediate) grammar chunk. -
newCmpgExpr
Constructs a CmpgExpr(Immediate, Immediate) grammar chunk. -
newCmpExpr
Constructs a CmpExpr(Immediate, Immediate) grammar chunk. -
newGtExpr
Constructs a GtExpr(Immediate, Immediate) grammar chunk. -
newLtExpr
Constructs a LtExpr(Immediate, Immediate) grammar chunk. -
newAddExpr
Constructs a AddExpr(Immediate, Immediate) grammar chunk. -
newAndExpr
Constructs a AndExpr(Immediate, Immediate) grammar chunk. -
newNegExpr
Constructs a NegExpr(Immediate, Immediate) grammar chunk. -
newLengthExpr
Constructs a LengthExpr(Immediate) grammar chunk. -
newCastExpr
Constructs a CastExpr(Immediate, Type) grammar chunk. -
newInstanceOfExpr
Constructs a InstanceOfExpr(Immediate, Type) grammar chunk. -
newNewArrayExpr
Constructs a NewArrayExpr(Type, Immediate) grammar chunk. -
newPhiExpr
-
newStaticInvokeExpr
Constructs a NewStaticInvokeExpr(ArrayType, List of Immediate) grammar chunk. -
newStaticInvokeExpr
-
newStaticInvokeExpr
-
newSpecialInvokeExpr
public static JSpecialInvokeExpr newSpecialInvokeExpr(Local base, MethodSignature method, List<Immediate> args) Constructs a NewSpecialInvokeExpr(Local base, SootMethod method, List of Immediate) grammar chunk. -
newSpecialInvokeExpr
public static JSpecialInvokeExpr newSpecialInvokeExpr(Local base, MethodSignature method, Immediate arg) -
newSpecialInvokeExpr
-
newDynamicInvokeExpr
public static JDynamicInvokeExpr newDynamicInvokeExpr(MethodSignature bootstrapMethodSignature, List<Immediate> bootstrapArgs, MethodSignature methodSignature, List<Immediate> args) Constructs a NewDynamicInvokeExpr(SootMethod bootstrapMethodSignature, List bootstrapArgs, SootMethod methodSignature, List args) grammar chunk. -
newDynamicInvokeExpr
public static JDynamicInvokeExpr newDynamicInvokeExpr(MethodSignature bootstrapMethodSignature, List<Immediate> bootstrapArgs, MethodSignature methodSignature, int tag, List<Immediate> args) Constructs a NewDynamicInvokeExpr(SootMethod bootstrapMethodSignature, List bootstrapArgs, SootMethod methodSignature, List args) grammar chunk. -
newVirtualInvokeExpr
public static JVirtualInvokeExpr newVirtualInvokeExpr(Local base, MethodSignature method, List<Immediate> args) Constructs a NewVirtualInvokeExpr(Local base, SootMethod method, List of Immediate) grammar chunk. -
newVirtualInvokeExpr
public static JVirtualInvokeExpr newVirtualInvokeExpr(Local base, MethodSignature method, Immediate arg) -
newVirtualInvokeExpr
-
newInterfaceInvokeExpr
public static JInterfaceInvokeExpr newInterfaceInvokeExpr(Local base, MethodSignature method, List<Immediate> args) Constructs a NewInterfaceInvokeExpr(Local base, SootMethod method, List of Immediate) grammar chunk. -
newInterfaceInvokeExpr
public static JInterfaceInvokeExpr newInterfaceInvokeExpr(Local base, MethodSignature method, Immediate arg) -
newInterfaceInvokeExpr
-
newThrowStmt
Constructs a ThrowStmt(Immediate) grammar chunk. -
newExitMonitorStmt
Constructs a ExitMonitorStmt(Immediate) grammar chunk. -
newEnterMonitorStmt
Constructs a EnterMonitorStmt(Immediate) grammar chunk. -
newBreakpointStmt
Constructs a BreakpointStmt() grammar chunk. -
newGotoStmt
Constructs a GotoStmt(Stmt) grammar chunk. -
newNopStmt
Constructs a NopStmt() grammar chunk. -
newReturnVoidStmt
Constructs a ReturnVoidStmt() grammar chunk. -
newReturnStmt
Constructs a ReturnStmt(Immediate) grammar chunk. -
newRetStmt
Constructs a RetStmt(Local) grammar chunk. -
newIfStmt
Constructs a IfStmt(Condition, Stmt) grammar chunk. -
newIdentityStmt
public static <L extends IdentityRef> JIdentityStmt newIdentityStmt(Local local, L identityRef, StmtPositionInfo posInfo) Constructs a IdentityStmt(Local, IdentityRef) grammar chunk. -
newAssignStmt
Constructs a AssignStmt(Variable, RValue) grammar chunk. -
newInvokeStmt
Constructs a InvokeStmt(InvokeExpr) grammar chunk. -
newTableSwitchStmt
public static JSwitchStmt newTableSwitchStmt(Immediate key, int lowIndex, int highIndex, StmtPositionInfo posInfo) Constructs a TableSwitchStmt(Immediate, int, int, List of Stmt, Stmt) grammar chunk. -
newLookupSwitchStmt
public static JSwitchStmt newLookupSwitchStmt(Immediate key, List<IntConstant> lookupValues, StmtPositionInfo posInfo) Constructs a LookupSwitchStmt(Immediate, List of Immediate, List of Stmt, Stmt) grammar chunk. -
newLocal
Constructs a Local with the given name and type. -
newStaticFieldRef
Constructs a JStaticFieldRef(FieldSignature) grammar chunk. -
newThisRef
Constructs a ThisRef(ClassType) grammar chunk. -
newParameterRef
Constructs a ParameterRef(SootMethod, int) grammar chunk. -
newInstanceFieldRef
Constructs a InstanceFieldRef(Local, FieldSignature) grammar chunk. -
newArrayRef
Constructs a ArrayRef(Local, Immediate) grammar chunk. -
newCaughtExceptionRef
Constructs a CaughtExceptionRef() grammar chunk. -
newNewExpr
Constructs a NewExpr(RefType) grammar chunk. -
newNewMultiArrayExpr
-
newTrap
-