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
  • Method Details

    • getName

      @Nonnull 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 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 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 class Object
      Returns:
      The hash code value for this MethodReference
    • equals

      boolean equals(@Nullable 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 class Object
      Parameters:
      o - The object to be compared for equality with this CallSiteReference
      Returns:
      true if the specified object is equal to this CallSiteReference