Package sootup.core.jimple.common
Class Local
java.lang.Object
sootup.core.jimple.common.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
Constructors -
Method Summary
Modifier and TypeMethodDescription<V extends ImmediateVisitor>
Vaccept(@NonNull V v) Called when this object is visited.voidcollectUses(List<Value> collector) Collects all values used by this value into the given list.final booleanintReturns a (not necessarily fixed) hash code for this object.booleanequivTo(@NonNull Object o, @NonNull 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(ControlFlowGraph<?> graph, Stmt stmt) Get all definition-stmts which define the given local used by the given stmt.@NonNull StringgetName()Returns the name of this object.getStmtsUsingOrDefiningthisLocal(Collection<Stmt> stmts, Stmt removedStmt) @NonNull TypegetType()Returns the type of this local.final inthashCode()toString()voidtoString(@NonNull StmtPrinter up) Appends a string representation of this value to the given printer.@NonNull Local@NonNull Local
-
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:EquivToReturns true if this object is equivalent to o according to the given comparator. -
equivHashCode
public int equivHashCode()Description copied from interface:EquivToReturns 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:
equivHashCodein interfaceEquivTo- Returns:
- a structural hash code consistent with equivTo
-
getName
Returns the name of this object. -
getType
Returns the type of this local. -
toString
-
toString
Description copied from interface:ValueAppends a string representation of this value to the given printer. -
collectUses
Description copied from interface:ValueCollects all values used by this value into the given list.- Specified by:
collectUsesin interfaceValue
-
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:AcceptorCalled when this object is visited.- Specified by:
acceptin interfaceAcceptor<ImmediateVisitor>- Type Parameters:
V- the concrete visitor type- Parameters:
v- the visitor processing this object- Returns:
- the visitor after processing
-
withName
-
withType
-