Package com.ibm.wala.shrike.shrikeCT
Class TypeAnnotationsReader
- java.lang.Object
-
- com.ibm.wala.shrike.shrikeCT.AttributeReader
-
- com.ibm.wala.shrike.shrikeCT.AnnotationsReader
-
- com.ibm.wala.shrike.shrikeCT.TypeAnnotationsReader
-
public class TypeAnnotationsReader extends AnnotationsReader
This class reads TypeAnnotations attributes, i.e.: RuntimeInvisibleTypeAnnotations and RuntimeVisibleTypeAnnotations
-
-
Nested Class Summary
-
Nested classes/interfaces inherited from class com.ibm.wala.shrike.shrikeCT.AnnotationsReader
AnnotationsReader.AnnotationAttribute, AnnotationsReader.ArrayElementValue, AnnotationsReader.ConstantElementValue, AnnotationsReader.ElementValue, AnnotationsReader.EnumElementValue
-
-
Field Summary
Fields Modifier and Type Field Description static java.util.List<com.ibm.wala.util.collections.Pair<TypeAnnotationsReader.TypePathKind,java.lang.Integer>>TYPEPATH_EMPTY-
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
Constructors Modifier Constructor Description protectedTypeAnnotationsReader(ClassReader.AttrIterator iter, java.lang.String label, ExceptionsReader exceptionReader, CodeReader codeReader, SignatureReader signatureReader, TypeAnnotationsReader.TypeAnnotationLocation location)
-
Method Summary
-
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 Detail
-
TYPEPATH_EMPTY
public static final java.util.List<com.ibm.wala.util.collections.Pair<TypeAnnotationsReader.TypePathKind,java.lang.Integer>> TYPEPATH_EMPTY
-
-
Constructor Detail
-
TypeAnnotationsReader
protected TypeAnnotationsReader(ClassReader.AttrIterator iter, java.lang.String label, ExceptionsReader exceptionReader, CodeReader codeReader, SignatureReader signatureReader, TypeAnnotationsReader.TypeAnnotationLocation location) throws InvalidClassFileException
- Throws:
InvalidClassFileException
-
-
Method Detail
-
getTypeAnnotationReaderAtClassfile
public static TypeAnnotationsReader getTypeAnnotationReaderAtClassfile(ClassReader.AttrIterator iter, java.lang.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, java.lang.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, java.lang.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, java.lang.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:
- JLS (SE8), 4.7.20
-
isKnownAnnotation
public static boolean isKnownAnnotation(java.lang.String name)
-
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)
-
-