Class BaseMethodHandleReference

java.lang.Object
org.jf.dexlib2.base.reference.BaseReference
org.jf.dexlib2.base.reference.BaseMethodHandleReference
All Implemented Interfaces:
Comparable<MethodHandleReference>, MethodHandleReference, Reference
Direct Known Subclasses:
BuilderMethodHandleReference, DexBackedMethodHandleReference, ImmutableMethodHandleReference

public abstract class BaseMethodHandleReference extends BaseReference implements MethodHandleReference
  • Constructor Details

    • BaseMethodHandleReference

      public BaseMethodHandleReference()
  • Method Details

    • hashCode

      public int hashCode()
      Description copied from interface: MethodHandleReference
      Returns a hashcode for this MethodHandleReference. This hashCode is defined to be the following:
       
       int hashCode =  getMethodHandleType();
       hashCode = hashCode*31 + getMemberReference().hashCode();
       
      Specified by:
      hashCode in interface MethodHandleReference
      Overrides:
      hashCode in class Object
      Returns:
      The hash code value for this MethodHandleReference
    • equals

      public boolean equals(Object o)
      Description copied from interface: MethodHandleReference
      Compares this MethodHandleReference to another MethodHandleReference for equality. This MethodHandleReference is equal to another MethodHandleReference if all of its fields are equal. That is, if the return values of getMethodHandleType() and getMemberReference() are all equal.
      Specified by:
      equals in interface MethodHandleReference
      Overrides:
      equals in class Object
      Parameters:
      o - The object to be compared for equality with this MethodHandleReference
      Returns:
      true if the specified object is equal to this MethodHandleReference
    • compareTo

      public int compareTo(@Nonnull MethodHandleReference o)
      Description copied from interface: MethodHandleReference
      Compare this MethodHandleReference to another MethodHandleReference. The comparison is based on the comparison of the return values of getMethodHandleType() and getMemberReference() in that order.
      Specified by:
      compareTo in interface Comparable<MethodHandleReference>
      Specified by:
      compareTo in interface MethodHandleReference
      Parameters:
      o - The MethodHandleReference to compare with this MethodHandleReference
      Returns:
      An integer representing the result of the comparison
    • toString

      public String toString()
      Overrides:
      toString in class Object