Package org.jf.dexlib2.iface.reference
Interface MethodHandleReference
-
- All Superinterfaces:
java.lang.Comparable<MethodHandleReference>,Reference
- All Known Implementing Classes:
BaseMethodHandleReference,BuilderMethodHandleReference,DexBackedMethodHandleReference,ImmutableMethodHandleReference
public interface MethodHandleReference extends Reference, java.lang.Comparable<MethodHandleReference>
This class represents a reference to a method handle
-
-
Nested Class Summary
-
Nested classes/interfaces inherited from interface org.jf.dexlib2.iface.reference.Reference
Reference.InvalidReferenceException
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description intcompareTo(MethodHandleReference o)Compare this MethodHandleReference to another MethodHandleReference.booleanequals(java.lang.Object o)Compares this MethodHandleReference to another MethodHandleReference for equality.ReferencegetMemberReference()Gets the member that is being referenced by this method handle.intgetMethodHandleType()Gets the method handle type.inthashCode()Returns a hashcode for this MethodHandleReference.-
Methods inherited from interface org.jf.dexlib2.iface.reference.Reference
validateReference
-
-
-
-
Method Detail
-
getMethodHandleType
int getMethodHandleType()
Gets the method handle type.- Returns:
- One of the MethodHandleType values
-
getMemberReference
@Nonnull Reference getMemberReference()
Gets the member that is being referenced by this method handle.- Returns:
- A MethodReference or FieldReference, depending on the method handle type
-
hashCode
int hashCode()
Returns a hashcode for this MethodHandleReference. This hashCode is defined to be the following:int hashCode = getMethodHandleType(); hashCode = hashCode*31 + getMemberReference().hashCode();- Overrides:
hashCodein classjava.lang.Object- Returns:
- The hash code value for this MethodHandleReference
-
equals
boolean equals(@Nullable java.lang.Object o)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.- Overrides:
equalsin classjava.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
int compareTo(@Nonnull MethodHandleReference o)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:
compareToin interfacejava.lang.Comparable<MethodHandleReference>- Parameters:
o- The MethodHandleReference to compare with this MethodHandleReference- Returns:
- An integer representing the result of the comparison
-
-