Package sootup.core.jimple.basic
Interface EquivTo
- All Known Subinterfaces:
BranchingStmt,ComparableConstant<C>,ConcreteRef,Constant,Expr,FallsThroughStmt,IdentityRef,Immediate,InvokableStmt,LogicalConstant<L>,LValue,NumericConstant<N>,RealConstant<R>,Ref,ReturnStmt,ShiftableConstant<A>,Stmt,Value
- All Known Implementing Classes:
AbstractBinopExpr,AbstractConditionExpr,AbstractDefinitionStmt,AbstractFloatBinopExpr,AbstractInstanceInvokeExpr,AbstractIntBinopExpr,AbstractIntLongBinopExpr,AbstractInvokeExpr,AbstractStmt,AbstractUnopExpr,BooleanConstant,ClassConstant,DoubleConstant,EnumConstant,FloatConstant,IntConstant,JAddExpr,JAndExpr,JArrayRef,JAssignStmt,JavaLocal,JBreakpointStmt,JCastExpr,JCaughtExceptionRef,JCmpExpr,JCmpgExpr,JCmplExpr,JDivExpr,JDynamicInvokeExpr,JEnterMonitorStmt,JEqExpr,JExitMonitorStmt,JFieldRef,JGeExpr,JGotoStmt,JGtExpr,JIdentityStmt,JIfStmt,JInstanceFieldRef,JInstanceOfExpr,JInterfaceInvokeExpr,JInvokeStmt,JLeExpr,JLengthExpr,JLtExpr,JMulExpr,JNeExpr,JNegExpr,JNewArrayExpr,JNewExpr,JNewMultiArrayExpr,JNopStmt,JOrExpr,JParameterRef,JPhiExpr,JRemExpr,JRetStmt,JReturnStmt,JReturnVoidStmt,JShlExpr,JShrExpr,JSpecialInvokeExpr,JStaticFieldRef,JStaticInvokeExpr,JSubExpr,JSwitchStmt,JThisRef,JThrowStmt,JUshrExpr,JVirtualInvokeExpr,JXorExpr,Local,LongConstant,MethodHandle,MethodType,NullConstant,StringConstant
public interface EquivTo
An alternate equivalence relation between objects, not necessarily compliant with the contract
defined by
Object.equals(Object). The standard interpretation will be structural
equality. We also demand that if x.equivTo(y), then x.equivHashCode() ==
y.equivHashCode.
See JimpleComparator for the detailed contract.
-
Method Summary
Modifier and TypeMethodDescriptionintReturns a (not necessarily fixed) hash code for this object.default booleanReturns true if this object is equivalent to o.booleanequivTo(Object o, @NonNull JimpleComparator comparator) Returns true if this object is equivalent to o according to the given comparator.
-
Method Details
-
equivTo
Returns true if this object is equivalent to o. The contract is defined inJimpleComparatorand is not necessarily compliant with the contract * defined byObject.equals(Object).- Parameters:
o- the object to compare with- Returns:
- true if this object is structurally equivalent to o
-
equivHashCode
int equivHashCode()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.- Returns:
- a structural hash code consistent with equivTo
-
equivTo
Returns true if this object is equivalent to o according to the given comparator.- Parameters:
o- the object to compare withcomparator- the comparator defining the equivalence relation- Returns:
- true if this object is structurally equivalent to o under the given comparator
-