Interface EquivTo

All Known Subinterfaces:
BranchingStmt, ComparableConstant<C>, ConcreteRef, Constant, Expr, FallsThroughStmt, IdentityRef, Immediate, InvokableStmt, LogicalConstant<L>, LValue, NumericConstant<N>, RealConstant<R>, Ref, 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 Type
    Method
    Description
    int
    Returns a (not necessarily fixed) hash code for this object.
    default boolean
    Returns true if this object is equivalent to o.
    boolean
    Returns true if this object is equivalent to o according to the given comparator.
  • Method Details

    • equivTo

      default boolean equivTo(Object o)
      Returns true if this object is equivalent to o. The contract is defined in JimpleComparator and is not necessarily compliant with the contract * defined by Object.equals(Object).
    • 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 in JimpleComparator.
    • equivTo

      boolean equivTo(Object o, @Nonnull JimpleComparator comparator)
      Returns true if this object is equivalent to o according to the given comparator.