Class TypeAnnotationsReader
java.lang.Object
com.ibm.wala.shrike.shrikeCT.AttributeReader
com.ibm.wala.shrike.shrikeCT.AnnotationsReader
com.ibm.wala.shrike.shrikeCT.TypeAnnotationsReader
This class reads TypeAnnotations attributes, i.e.: RuntimeInvisibleTypeAnnotations and
RuntimeVisibleTypeAnnotations
- Author:
- Martin Hecker martin.hecker@kit.edu
-
Nested Class Summary
Modifier and TypeClassDescriptionstatic enum
static class
static class
static class
static class
static class
static class
static enum
Possible target_type items.static enum
Known target_types for JSR 308 Type-Annotation.static class
static class
static enum
Enumeration of those Bytecode locations where type annotation may appear (in the corresponding attribute table).static class
ATypeAnnotationsReader.TypeAnnotationTarget
represents one of the possible target_info structurestatic interface
static class
static class
static class
static enum
Nested classes/interfaces inherited from class com.ibm.wala.shrike.shrikeCT.AnnotationsReader
AnnotationsReader.AnnotationAttribute, AnnotationsReader.ArrayElementValue, AnnotationsReader.ConstantElementValue, AnnotationsReader.ElementValue, AnnotationsReader.EnumElementValue
-
Field Summary
Modifier and TypeFieldDescriptionstatic final List
<Pair<TypeAnnotationsReader.TypePathKind, Integer>> Fields inherited from class com.ibm.wala.shrike.shrikeCT.AnnotationsReader
beginOffset
Fields inherited from class com.ibm.wala.shrike.shrikeCT.AttributeReader
attr, cr, length
-
Constructor Summary
ModifierConstructorDescriptionprotected
TypeAnnotationsReader
(ClassReader.AttrIterator iter, String label, ExceptionsReader exceptionReader, CodeReader codeReader, SignatureReader signatureReader, TypeAnnotationsReader.TypeAnnotationLocation location) -
Method Summary
Modifier and TypeMethodDescriptionstatic TypeAnnotationsReader
getReaderForAnnotationAtClassfile
(TypeAnnotationsReader.AnnotationType type, ClassReader.AttrIterator iter, SignatureReader signatureReader) static TypeAnnotationsReader
getReaderForAnnotationAtCode
(TypeAnnotationsReader.AnnotationType type, ClassReader.AttrIterator iter, CodeReader codereader) static TypeAnnotationsReader
getReaderForAnnotationAtFieldInfo
(TypeAnnotationsReader.AnnotationType type, ClassReader.AttrIterator iter) static TypeAnnotationsReader
getReaderForAnnotationAtMethodInfo
(TypeAnnotationsReader.AnnotationType type, ClassReader.AttrIterator iter, ExceptionsReader exceptionReader, SignatureReader signatureReader) static TypeAnnotationsReader
getTypeAnnotationReaderAtClassfile
(ClassReader.AttrIterator iter, String label, SignatureReader signatureReader) static TypeAnnotationsReader
getTypeAnnotationReaderAtCode
(ClassReader.AttrIterator iter, String label, CodeReader codeReader) static TypeAnnotationsReader
static TypeAnnotationsReader
getTypeAnnotationReaderAtMethodInfo
(ClassReader.AttrIterator iter, String label, ExceptionsReader exceptionReader, SignatureReader signatureReader) static boolean
isKnownAnnotation
(String name) Methods inherited from class com.ibm.wala.shrike.shrikeCT.AnnotationsReader
getAllAnnotations, getAllParameterAnnotations, getAnnotationCount, getAttributeAndSize, getAttributeSize, getReaderForAnnotation, getUtf8ConstantPoolValue, readElementValueAndSize
Methods inherited from class com.ibm.wala.shrike.shrikeCT.AttributeReader
checkSize, checkSizeEquals, getClassReader, getRawOffset, getRawSize
-
Field Details
-
TYPEPATH_EMPTY
-
-
Constructor Details
-
TypeAnnotationsReader
protected TypeAnnotationsReader(ClassReader.AttrIterator iter, String label, ExceptionsReader exceptionReader, CodeReader codeReader, SignatureReader signatureReader, TypeAnnotationsReader.TypeAnnotationLocation location) throws InvalidClassFileException - Throws:
InvalidClassFileException
-
-
Method Details
-
getTypeAnnotationReaderAtClassfile
public static TypeAnnotationsReader getTypeAnnotationReaderAtClassfile(ClassReader.AttrIterator iter, String label, SignatureReader signatureReader) throws InvalidClassFileException - Returns:
- a TypeAnnotationReader for reading type annotations in the attributes table of a ClassFile structure
- Throws:
InvalidClassFileException
-
getTypeAnnotationReaderAtMethodInfo
public static TypeAnnotationsReader getTypeAnnotationReaderAtMethodInfo(ClassReader.AttrIterator iter, String label, ExceptionsReader exceptionReader, SignatureReader signatureReader) throws InvalidClassFileException - Returns:
- a TypeAnnotationReader for reading type annotations in the attributes table of a method_info structure
- Throws:
InvalidClassFileException
-
getTypeAnnotationReaderAtFieldInfo
public static TypeAnnotationsReader getTypeAnnotationReaderAtFieldInfo(ClassReader.AttrIterator iter, String label) throws InvalidClassFileException - Returns:
- a TypeAnnotationReader for reading type annotations in the attributes table of a field_info structure
- Throws:
InvalidClassFileException
-
getTypeAnnotationReaderAtCode
public static TypeAnnotationsReader getTypeAnnotationReaderAtCode(ClassReader.AttrIterator iter, String label, CodeReader codeReader) throws InvalidClassFileException - Returns:
- a TypeAnnotationReader for reading type annotations in the attributes table of a Code attribute
- Throws:
InvalidClassFileException
-
getAllTypeAnnotations
public TypeAnnotationsReader.TypeAnnotationAttribute[] getAllTypeAnnotations() throws InvalidClassFileException- Returns:
- an array TypeAnnotationAttribute[] corresponding to the annotations[num_annotations]
table specified as:
RuntimeVisibleTypeAnnotations_attribute { u2 attribute_name_index; u4 attribute_length; u2 num_annotations; type_annotation annotations[num_annotations]; }
- Throws:
InvalidClassFileException
- See Also:
-
isKnownAnnotation
-
getReaderForAnnotationAtClassfile
public static TypeAnnotationsReader getReaderForAnnotationAtClassfile(TypeAnnotationsReader.AnnotationType type, ClassReader.AttrIterator iter, SignatureReader signatureReader) -
getReaderForAnnotationAtMethodInfo
public static TypeAnnotationsReader getReaderForAnnotationAtMethodInfo(TypeAnnotationsReader.AnnotationType type, ClassReader.AttrIterator iter, ExceptionsReader exceptionReader, SignatureReader signatureReader) -
getReaderForAnnotationAtFieldInfo
public static TypeAnnotationsReader getReaderForAnnotationAtFieldInfo(TypeAnnotationsReader.AnnotationType type, ClassReader.AttrIterator iter) -
getReaderForAnnotationAtCode
public static TypeAnnotationsReader getReaderForAnnotationAtCode(TypeAnnotationsReader.AnnotationType type, ClassReader.AttrIterator iter, CodeReader codereader)
-