Class BaseMethodHandleReference

    • Constructor Detail

      • BaseMethodHandleReference

        public BaseMethodHandleReference()
    • Method Detail

      • 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 java.lang.Object
        Returns:
        The hash code value for this MethodHandleReference
      • equals

        public boolean equals​(java.lang.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 java.lang.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 java.lang.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 java.lang.String toString()
        Overrides:
        toString in class java.lang.Object