com.android.dx.cf.direct
Class AnnotationParser

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

public final class AnnotationParser
extends Object

Parser for annotations.


Constructor Summary
AnnotationParser(DirectClassFile cf, int offset, int length, ParseObserver observer)
          Constructs an instance.
 
Method Summary
 Annotations parseAnnotationAttribute(AnnotationVisibility visibility)
          Parses an annotation attribute, per se.
 AnnotationsList parseParameterAttribute(AnnotationVisibility visibility)
          Parses a parameter annotation attribute.
 Constant parseValueAttribute()
          Parses an annotation value (element_value) attribute.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

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 Detail

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


Copyright © 2015. All rights reserved.