Package org.jf.dexlib2.iface.reference
Interface CallSiteReference
-
- All Superinterfaces:
Reference
- All Known Implementing Classes:
BaseCallSiteReference
,BuilderCallSiteReference
,DexBackedCallSiteReference
,ImmutableCallSiteReference
public interface CallSiteReference extends Reference
This class represents a reference to a call site
-
-
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 boolean
equals(java.lang.Object o)
Compares this CallSiteReference to another CallSiteReference for equality.java.util.List<? extends EncodedValue>
getExtraArguments()
MethodHandleReference
getMethodHandle()
Gets a reference to a method handle for the bootstrap linker methodjava.lang.String
getMethodName()
MethodProtoReference
getMethodProto()
java.lang.String
getName()
Gets a name for this call site.int
hashCode()
Returns a hashcode for this CallSiteReference.-
Methods inherited from interface org.jf.dexlib2.iface.reference.Reference
validateReference
-
-
-
-
Method Detail
-
getName
@Nonnull java.lang.String getName()
Gets a name for this call site. This is an arbitrary synthetic string that serves to differentiate call sites that would otherwise be identical. It can be any arbitrary string, with the only requirement being that 2 different, but otherwise identical call sites in the same dex file must not share the same name. Multiple non-identical call sites may use the same name however.- Returns:
- The name for this call site.
-
getMethodHandle
@Nonnull MethodHandleReference getMethodHandle()
Gets a reference to a method handle for the bootstrap linker method- Returns:
- A MethodHandleReference to the bootstrap linker method
-
getMethodName
@Nonnull java.lang.String getMethodName()
- Returns:
- A method name that the bootstrap linker should resolve.
-
getMethodProto
@Nonnull MethodProtoReference getMethodProto()
- Returns:
- A MethodProtoReference corresponding to the prototype of the method that the bootstrap linker should resolve
-
getExtraArguments
@Nonnull java.util.List<? extends EncodedValue> getExtraArguments()
- Returns:
- A list of extra arguments to pass to the bootstrap linker
-
hashCode
int hashCode()
Returns a hashcode for this CallSiteReference. This hashCode is defined to be the following:int hashCode = getName().hashCode(); hashCode = hashCode*31 + getMethodHandle().hashCode(); hashCode = hashCode*31 + getMethodName().hashCode(); hashCode = hashCode*31 + getMethodProto().hashCode(); hashCode = hashCode*31 + getExtraArguments().hashCode();
- Overrides:
hashCode
in classjava.lang.Object
- Returns:
- The hash code value for this MethodReference
-
equals
boolean equals(@Nullable java.lang.Object o)
Compares this CallSiteReference to another CallSiteReference for equality. This CallSiteReference is equal to another CallSiteReference if all of its fields are equal. That is, if the return values of getMethodHandle(), getMethodName(), getMethodProto() and getExtraArguments() are all equal.- Overrides:
equals
in classjava.lang.Object
- Parameters:
o
- The object to be compared for equality with this CallSiteReference- Returns:
- true if the specified object is equal to this CallSiteReference
-
-