Class TypeAnnotation
java.lang.Object
com.ibm.wala.types.annotations.TypeAnnotation
A
TypeAnnotation represents a JSR 308 Java Type Annotation.- Author:
- Martin Hecker martin.hecker@kit.edu
- See Also:
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic classstatic classstatic classstatic classstatic classstatic classstatic classstatic classATypeAnnotation.TypeAnnotationTargetrepresents the "target" of a Type Annotation.static interfaceA @{TypeAnnotationTargetConverter} takes "unresolved" instances ofTypeAnnotationsReader.TypeAnnotationTarget, resolves some byte-code specific data, and returns instances of the correspondingTypeAnnotation.TypeAnnotationTargetsubclass.static classstatic classstatic class -
Method Summary
Modifier and TypeMethodDescriptionbooleanstatic Collection<TypeAnnotation> getTypeAnnotationsFromReader(TypeAnnotationsReader r, TypeAnnotation.TypeAnnotationTargetConverter converter, ClassLoaderReference clRef) inthashCode()static TypeAnnotationmake(Annotation annotation, TypeAnnotation.TypeAnnotationTarget typeAnnotationTarget, TypeAnnotationsReader.TargetType targetType) This method is intended to be used in testing only.static TypeAnnotationmake(Annotation annotation, List<Pair<TypeAnnotationsReader.TypePathKind, Integer>> typePath, TypeAnnotation.TypeAnnotationTarget typeAnnotationTarget, TypeAnnotationsReader.TargetType targetType) This method is intended to be used in testing only.targetConverterAtCode(ClassLoaderReference clRef, IBytecodeMethod<?> method) toString()
-
Method Details
-
toString
-
hashCode
-
equals
-
getTypeAnnotationsFromReader
public static Collection<TypeAnnotation> getTypeAnnotationsFromReader(TypeAnnotationsReader r, TypeAnnotation.TypeAnnotationTargetConverter converter, ClassLoaderReference clRef) throws InvalidClassFileException - Throws:
InvalidClassFileException
-
make
public static TypeAnnotation make(Annotation annotation, List<Pair<TypeAnnotationsReader.TypePathKind, Integer>> typePath, TypeAnnotation.TypeAnnotationTarget typeAnnotationTarget, TypeAnnotationsReader.TargetType targetType) This method is intended to be used in testing only.Otherwise, obtain TypeAnnotations from
- Returns:
- A
TypeAnnotationcomprised of annotation, typePath and targetType
-
make
public static TypeAnnotation make(Annotation annotation, TypeAnnotation.TypeAnnotationTarget typeAnnotationTarget, TypeAnnotationsReader.TargetType targetType) This method is intended to be used in testing only.Otherwise, obtain TypeAnnotations from
- Returns:
- A
TypeAnnotationcomprised of annotation, an empty typePath, and targetType
-
targetConverterAtCode
public static TypeAnnotation.TypeAnnotationTargetConverter targetConverterAtCode(ClassLoaderReference clRef, IBytecodeMethod<?> method) -
targetConverterAtMethodInfo
public static TypeAnnotation.TypeAnnotationTargetConverter targetConverterAtMethodInfo(ClassLoaderReference clRef) -
targetConverterAtClassFile
public static TypeAnnotation.TypeAnnotationTargetConverter targetConverterAtClassFile(ClassLoaderReference clRef) -
targetConverterAtFieldInfo
-
getAnnotation
- Returns:
- the
Annotationof thisTypeAnnotation
-
getTypePath
- Returns:
- the typePath of this
TypeAnnotation - See Also:
-
getTypeAnnotationTarget
- Returns:
- the
TypeAnnotation.TypeAnnotationTargetof thisTypeAnnotation
-
getTargetType
- Returns:
- the
TypeAnnotationsReader.TargetTypeof thisTypeAnnotation
-