Package org.jf.dexlib2.iface.reference
Interface MethodHandleReference
- All Superinterfaces:
Comparable<MethodHandleReference>,Reference
- All Known Implementing Classes:
BaseMethodHandleReference,BuilderMethodHandleReference,DexBackedMethodHandleReference,ImmutableMethodHandleReference
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
Modifier and TypeMethodDescriptionintCompare this MethodHandleReference to another MethodHandleReference.booleanCompares this MethodHandleReference to another MethodHandleReference for equality.Gets the member that is being referenced by this method handle.intGets the method handle type.inthashCode()Returns a hashcode for this MethodHandleReference.Methods inherited from interface org.jf.dexlib2.iface.reference.Reference
validateReference
-
Method Details
-
getMethodHandleType
int getMethodHandleType()Gets the method handle type.- Returns:
- One of the MethodHandleType values
-
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(); -
equals
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. -
compareTo
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 interfaceComparable<MethodHandleReference>- Parameters:
o- The MethodHandleReference to compare with this MethodHandleReference- Returns:
- An integer representing the result of the comparison
-