Package sootup.core.jimple.basic
Class Local
java.lang.Object
sootup.core.jimple.basic.Local
- Direct Known Subclasses:
JavaLocal
Local variable in
Body
. Use LocalGenerator
to generate locals.
Prefer to use the factory methods in Jimple
.
- Author:
- Linghui Luo
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescription<V extends ImmediateVisitor>
Vaccept
(V v) Called when this object is visited.final boolean
int
Returns a (not necessarily fixed) hash code for this object.boolean
equivTo
(Object o, JimpleComparator comparator) Returns true if this object is equivalent to o according to the given comparator.getDefs
(Collection<Stmt> defs) returns a List that can contain: Locals, JFieldRefs, JArrayRefsgetDefsForLocalUse
(StmtGraph<?> graph, Stmt stmt) Get all definition-stmts which define the given local used by the given stmt.getName()
Returns the name of this object.getStmtsUsingOrDefiningthisLocal
(Collection<Stmt> stmts, Stmt removedStmt) getType()
Returns the type of this local.getUses()
Returns a List of Locals,FieldRefs,ArrayRefs which are used by (ie contained within) this Expression or Reference.final int
hashCode()
toString()
void
toString
(StmtPrinter up)
-
Constructor Details
-
Local
Constructs a JimpleLocal of the given name and type.
-
-
Method Details
-
equals
-
hashCode
public final int hashCode() -
equivTo
Description copied from interface:EquivTo
Returns true if this object is equivalent to o according to the given comparator. -
equivHashCode
public int equivHashCode()Description copied from interface:EquivTo
Returns a (not necessarily fixed) hash code for this object. This hash code coincides with equivTo; it is undefined in the presence of mutable objects. The contract is defined inJimpleComparator
.- Specified by:
equivHashCode
in interfaceEquivTo
-
getName
Returns the name of this object. -
getType
Returns the type of this local. -
toString
-
toString
-
getUses
Description copied from interface:Value
Returns a List of Locals,FieldRefs,ArrayRefs which are used by (ie contained within) this Expression or Reference. -
getDefs
returns a List that can contain: Locals, JFieldRefs, JArrayRefs -
getDefsForLocalUse
Get all definition-stmts which define the given local used by the given stmt.- Parameters:
graph
- a stmt graph which contains the given stmts.stmt
- a stmt which uses the given local.
-
getStmtsUsingOrDefiningthisLocal
-
accept
Description copied from interface:Acceptor
Called when this object is visited.- Specified by:
accept
in interfaceAcceptor<ImmediateVisitor>
-
withName
-
withType
-