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
Nested ClassesModifier and TypeClassDescriptionstatic enumstatic classstatic classstatic classstatic classstatic classstatic classstatic enumPossible target_type items.static enumKnown target_types for JSR 308 Type-Annotation.static classstatic classstatic enumEnumeration of those Bytecode locations where type annotation may appear (in the corresponding attribute table).static classATypeAnnotationsReader.TypeAnnotationTargetrepresents one of the possible target_info structurestatic interfacestatic classstatic classstatic classstatic enumNested classes/interfaces inherited from class AnnotationsReader
AnnotationsReader.AnnotationAttribute, AnnotationsReader.ArrayElementValue, AnnotationsReader.ConstantElementValue, AnnotationsReader.ElementValue, AnnotationsReader.EnumElementValue -
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final List<Pair<TypeAnnotationsReader.TypePathKind, Integer>> Fields inherited from class AnnotationsReader
beginOffsetFields inherited from class AttributeReader
attr, cr, length -
Constructor Summary
ConstructorsModifierConstructorDescriptionprotectedTypeAnnotationsReader(ClassReader.AttrIterator iter, String label, ExceptionsReader exceptionReader, CodeReader codeReader, SignatureReader signatureReader, TypeAnnotationsReader.TypeAnnotationLocation location) -
Method Summary
Modifier and TypeMethodDescriptionstatic TypeAnnotationsReadergetReaderForAnnotationAtClassfile(TypeAnnotationsReader.AnnotationType type, ClassReader.AttrIterator iter, SignatureReader signatureReader) static TypeAnnotationsReadergetReaderForAnnotationAtCode(TypeAnnotationsReader.AnnotationType type, ClassReader.AttrIterator iter, CodeReader codereader) static TypeAnnotationsReadergetReaderForAnnotationAtFieldInfo(TypeAnnotationsReader.AnnotationType type, ClassReader.AttrIterator iter) static TypeAnnotationsReadergetReaderForAnnotationAtMethodInfo(TypeAnnotationsReader.AnnotationType type, ClassReader.AttrIterator iter, ExceptionsReader exceptionReader, SignatureReader signatureReader) static TypeAnnotationsReadergetTypeAnnotationReaderAtClassfile(ClassReader.AttrIterator iter, String label, SignatureReader signatureReader) static TypeAnnotationsReadergetTypeAnnotationReaderAtCode(ClassReader.AttrIterator iter, String label, CodeReader codeReader) static TypeAnnotationsReaderstatic TypeAnnotationsReadergetTypeAnnotationReaderAtMethodInfo(ClassReader.AttrIterator iter, String label, ExceptionsReader exceptionReader, SignatureReader signatureReader) static booleanisKnownAnnotation(String name) Methods inherited from class AnnotationsReader
getAllAnnotations, getAllParameterAnnotations, getAnnotationCount, getAttributeAndSize, getAttributeSize, getReaderForAnnotation, getUtf8ConstantPoolValue, readElementValueAndSizeMethods inherited from class 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)
-