Class AnnotationParser

java.lang.Object
com.android.dx.cf.direct.AnnotationParser

public final class AnnotationParser extends Object
Parser for annotations.
  • Constructor Details

    • AnnotationParser

      public AnnotationParser(DirectClassFile cf, int offset, int length, ParseObserver observer)
      Constructs an instance.
      Parameters:
      cf - non-null; class file to parse from
      offset - >= 0; offset into the class file data to parse at
      length - >= 0; number of bytes left in the attribute data
      observer - null-ok; parse observer to notify, if any
  • Method Details

    • parseValueAttribute

      public Constant parseValueAttribute()
      Parses an annotation value (element_value) attribute.
      Returns:
      non-null; the parsed constant value
    • parseParameterAttribute

      public AnnotationsList parseParameterAttribute(AnnotationVisibility visibility)
      Parses a parameter annotation attribute.
      Parameters:
      visibility - non-null; visibility of the parsed annotations
      Returns:
      non-null; the parsed list of lists of annotations
    • parseAnnotationAttribute

      public Annotations parseAnnotationAttribute(AnnotationVisibility visibility)
      Parses an annotation attribute, per se.
      Parameters:
      visibility - non-null; visibility of the parsed annotations
      Returns:
      non-null; the list of annotations read from the attribute data