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 int
compareTo(MethodHandleReference o)
Compare this MethodHandleReference to another MethodHandleReference.boolean
equals(java.lang.Object o)
Compares this MethodHandleReference to another MethodHandleReference for equality.Reference
getMemberReference()
Gets the member that is being referenced by this method handle.int
getMethodHandleType()
Gets the method handle type.int
hashCode()
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:
hashCode
in 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:
equals
in 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:
compareTo
in interfacejava.lang.Comparable<MethodHandleReference>
- Parameters:
o
- The MethodHandleReference to compare with this MethodHandleReference- Returns:
- An integer representing the result of the comparison
-
-