Class MethodAnnotationStruct

java.lang.Object
com.android.dx.dex.file.MethodAnnotationStruct
All Implemented Interfaces:
ToHuman, Comparable<MethodAnnotationStruct>

public final class MethodAnnotationStruct extends Object implements ToHuman, Comparable<MethodAnnotationStruct>
Association of a method and its annotations.
  • Constructor Details

    • MethodAnnotationStruct

      public MethodAnnotationStruct(CstMethodRef method, AnnotationSetItem annotations)
      Constructs an instance.
      Parameters:
      method - non-null; the method in question
      annotations - non-null; the associated annotations
  • Method Details

    • hashCode

      public int hashCode()
      Overrides:
      hashCode in class Object
    • equals

      public boolean equals(Object other)
      Overrides:
      equals in class Object
    • compareTo

      public int compareTo(MethodAnnotationStruct other)
      Specified by:
      compareTo in interface Comparable<MethodAnnotationStruct>
    • addContents

      public void addContents(DexFile file)
    • writeTo

      public void writeTo(DexFile file, AnnotatedOutput out)
    • toHuman

      public String toHuman()
      Return the "human" string form of this instance. This is generally less "debuggy" than toString().
      Specified by:
      toHuman in interface ToHuman
      Returns:
      non-null; the human string form
    • getMethod

      public CstMethodRef getMethod()
      Gets the method this item is for.
      Returns:
      non-null; the method
    • getAnnotations

      public Annotations getAnnotations()
      Gets the associated annotations.
      Returns:
      non-null; the annotations