public class AnnotationsReader extends AttributeReader
Modifier and Type | Class and Description |
---|---|
static class |
AnnotationsReader.AnnotationAttribute
Representation of an annotation attribute.
|
static class |
AnnotationsReader.AnnotationType |
static class |
AnnotationsReader.ArrayElementValue
represents an annotation argument that itself is an array of arguments
|
static class |
AnnotationsReader.ConstantElementValue
Represents a constant argument to an annotation.
|
static interface |
AnnotationsReader.ElementValue
Marker interface for possible element values in an annotation attribute.
|
static class |
AnnotationsReader.EnumElementValue
Represents enum constant annotation arguments.
|
attr, cr, length
Constructor and Description |
---|
AnnotationsReader(ClassReader.AttrIterator iter,
String label) |
Modifier and Type | Method and Description |
---|---|
AnnotationsReader.AnnotationAttribute[] |
getAllAnnotations()
get all the annotations declared in this attribute.
|
AnnotationsReader.AnnotationAttribute[][] |
getAllParameterAnnotations()
param_annotations {
u2 attribute_name_index;
u4 attribute_length;
u1 num_parameters;
{
u2 num_annotations;
annotation annotations[num_annotations];
} parameter_annotations[num_parameters];
|
int |
getAnnotationCount() |
int |
getAttributeSize() |
static AnnotationsReader |
getReaderForAnnotation(AnnotationsReader.AnnotationType type,
ClassReader.AttrIterator iter) |
static boolean |
isKnownAnnotation(String name) |
checkSize, checkSizeEquals, getClassReader, getRawOffset, getRawSize
public AnnotationsReader(ClassReader.AttrIterator iter, String label) throws InvalidClassFileException
InvalidClassFileException
public int getAnnotationCount() throws InvalidClassFileException
InvalidClassFileException
public int getAttributeSize() throws InvalidClassFileException
InvalidClassFileException
public AnnotationsReader.AnnotationAttribute[] getAllAnnotations() throws InvalidClassFileException
InvalidClassFileException
public AnnotationsReader.AnnotationAttribute[][] getAllParameterAnnotations() throws InvalidClassFileException
param_annotations { u2 attribute_name_index; u4 attribute_length; u1 num_parameters; { u2 num_annotations; annotation annotations[num_annotations]; } parameter_annotations[num_parameters];
InvalidClassFileException
public static boolean isKnownAnnotation(String name)
public static AnnotationsReader getReaderForAnnotation(AnnotationsReader.AnnotationType type, ClassReader.AttrIterator iter)