Class AnnotationValue
- java.lang.Object
-
- edu.umd.cs.findbugs.classfile.analysis.AnnotationValue
-
public class AnnotationValue extends java.lang.Object
The "raw" version of an annotation appearing in a class file.
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description private class
AnnotationValue.AnnotationArrayVisitor
-
Field Summary
Fields Modifier and Type Field Description private ClassDescriptor
annotationClass
private java.util.Map<java.lang.String,java.lang.Object>
typeMap
private java.util.Map<java.lang.String,java.lang.Object>
valueMap
-
Constructor Summary
Constructors Constructor Description AnnotationValue(ClassDescriptor annotationClass)
Constructor.AnnotationValue(java.lang.String annotationClass)
Constructor.
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description private static java.lang.String
canonicalString(java.lang.String s)
ClassDescriptor
getAnnotationClass()
org.objectweb.asm.AnnotationVisitor
getAnnotationVisitor()
Get an AnnotationVisitor which can populate this AnnotationValue object.java.lang.Object
getDesc(java.lang.String name)
Get a descriptor specifying the type of an annotation element.java.lang.Object
getValue(java.lang.String name)
Get the value of given annotation element.java.lang.String
toString()
-
-
-
Field Detail
-
annotationClass
private final ClassDescriptor annotationClass
-
valueMap
private final java.util.Map<java.lang.String,java.lang.Object> valueMap
-
typeMap
private final java.util.Map<java.lang.String,java.lang.Object> typeMap
-
-
Constructor Detail
-
AnnotationValue
public AnnotationValue(ClassDescriptor annotationClass)
Constructor.- Parameters:
annotationClass
- the annotation class
-
AnnotationValue
public AnnotationValue(java.lang.String annotationClass)
Constructor.- Parameters:
annotationClass
- JVM signature of the annotation class
-
-
Method Detail
-
getAnnotationClass
public ClassDescriptor getAnnotationClass()
- Returns:
- ClassDescriptor referring to the annotation class
-
getValue
public java.lang.Object getValue(java.lang.String name)
Get the value of given annotation element. See AnnotationVisitor Javadoc for information on what the object returned could be.- Parameters:
name
- name of annotation element- Returns:
- the element value (primitive value, String value, enum value, Type, or array of one of the previous)
-
getDesc
public java.lang.Object getDesc(java.lang.String name)
Get a descriptor specifying the type of an annotation element.- Parameters:
name
- name of annotation element- Returns:
- descriptor specifying the type of the annotation element
-
toString
public java.lang.String toString()
- Overrides:
toString
in classjava.lang.Object
-
canonicalString
private static java.lang.String canonicalString(java.lang.String s)
-
getAnnotationVisitor
public org.objectweb.asm.AnnotationVisitor getAnnotationVisitor()
Get an AnnotationVisitor which can populate this AnnotationValue object.
-
-