Class FieldAnnotationStruct

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

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

    • FieldAnnotationStruct

      public FieldAnnotationStruct(CstFieldRef field, AnnotationSetItem annotations)
      Constructs an instance.
      Parameters:
      field - non-null; the field 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(FieldAnnotationStruct other)
      Specified by:
      compareTo in interface Comparable<FieldAnnotationStruct>
    • 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
    • getField

      public CstFieldRef getField()
      Gets the field this item is for.
      Returns:
      non-null; the field
    • getAnnotations

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