Class BaseTypeReference

java.lang.Object
org.jf.dexlib2.base.reference.BaseReference
org.jf.dexlib2.base.reference.BaseTypeReference
All Implemented Interfaces:
CharSequence, Comparable<CharSequence>, Reference, TypeReference
Direct Known Subclasses:
BaseMethodParameter, BuilderClassDef, BuilderTypeReference, ClassDefRewriter.RewrittenClassDef, DexBackedClassDef, DexBackedTypeReference, ImmutableClassDef, ImmutableTypeReference, PoolClassDef, ReflectionClassDef

public abstract class BaseTypeReference extends BaseReference implements TypeReference
  • Constructor Details

    • BaseTypeReference

      public BaseTypeReference()
  • Method Details

    • hashCode

      public int hashCode()
      Description copied from interface: TypeReference
      Returns a hashcode for this TypeReference. This is defined to be getType().hashCode()
      Specified by:
      hashCode in interface TypeReference
      Overrides:
      hashCode in class Object
      Returns:
      The hash code value for this TypeReference
    • equals

      public boolean equals(Object o)
      Description copied from interface: TypeReference
      Compares this TypeReference to another TypeReference, or more generally to another CharSequence for equality. This TypeReference is equal to a CharSequence iff this.getType().equals(other.toString()). Equivalently, This TypeReference is equal to another TypeReference iff this.getType().equals(other.getType()).
      Specified by:
      equals in interface TypeReference
      Overrides:
      equals in class Object
      Parameters:
      o - The object to be compared for equality with this TypeReference
      Returns:
      true if the specified object is equal to this TypeReference
    • compareTo

      public int compareTo(@Nonnull CharSequence o)
      Description copied from interface: TypeReference
      Compare this TypeReference to another TypeReference, or more generally to another CharSequence. The comparison is defined to be this.getType().compareTo(other.toString())
      Specified by:
      compareTo in interface Comparable<CharSequence>
      Specified by:
      compareTo in interface TypeReference
      Parameters:
      o - The CharSequence to compare with this TypeReference
      Returns:
      An integer representing the result of the comparison
    • length

      public int length()
      Specified by:
      length in interface CharSequence
    • charAt

      public char charAt(int index)
      Specified by:
      charAt in interface CharSequence
    • subSequence

      public CharSequence subSequence(int start, int end)
      Specified by:
      subSequence in interface CharSequence
    • toString

      @Nonnull public String toString()
      Specified by:
      toString in interface CharSequence
      Overrides:
      toString in class Object