Interface CallSiteReference

    • 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 class java.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 class java.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