public class DefaultJavaAnnotation extends AbstractJavaModel implements AnnotationValue, java.io.Serializable, JavaAnnotation
Modifier and Type | Field and Description |
---|---|
private java.util.Map<java.lang.String,java.lang.Object> |
namedParameters
Annotation properties as Parameters
|
private java.util.Map<java.lang.String,AnnotationValue> |
properties
Annotation properties as AnnotationValues
|
private JavaClass |
type |
Constructor and Description |
---|
DefaultJavaAnnotation(JavaClass type) |
DefaultJavaAnnotation(JavaClass type,
java.util.Map<java.lang.String,java.lang.Object> namedParameters) |
Modifier and Type | Method and Description |
---|---|
java.lang.Object |
accept(ExpressionVisitor visitor)
Accept a visitor for this value.
|
java.lang.String |
getCodeBlock() |
java.lang.Object |
getNamedParameter(java.lang.String key) |
java.util.Map<java.lang.String,java.lang.Object> |
getNamedParameterMap() |
DefaultJavaAnnotation |
getParameterValue()
Get a parameter value for
JavaAnnotation.getNamedParameter(String) . |
AnnotationValue |
getProperty(java.lang.String name) |
java.util.Map<java.lang.String,AnnotationValue> |
getPropertyMap() |
JavaClass |
getType() |
void |
setProperty(java.lang.String name,
AnnotationValue value) |
java.lang.String |
toString() |
getLineNumber, getModelWriter, setLineNumber, setModelWriterFactory
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
getLineNumber
private final JavaClass type
private final java.util.Map<java.lang.String,AnnotationValue> properties
This map contains the parsed AnnotationValue for each property and allows access to the full parse tree, including typerefs and expressions.
private final java.util.Map<java.lang.String,java.lang.Object> namedParameters
public DefaultJavaAnnotation(JavaClass type, java.util.Map<java.lang.String,java.lang.Object> namedParameters)
public DefaultJavaAnnotation(JavaClass type)
public final void setProperty(java.lang.String name, AnnotationValue value)
public JavaClass getType()
getType
in interface JavaAnnotation
public java.lang.Object getNamedParameter(java.lang.String key)
getNamedParameter
in interface JavaAnnotation
public java.util.Map<java.lang.String,java.lang.Object> getNamedParameterMap()
getNamedParameterMap
in interface JavaAnnotation
public java.lang.String getCodeBlock()
getCodeBlock
in interface JavaModel
public java.lang.Object accept(ExpressionVisitor visitor)
accept
in interface AnnotationValue
visitor
- Visitorpublic DefaultJavaAnnotation getParameterValue()
JavaAnnotation.getNamedParameter(String)
.getParameterValue
in interface Expression
public java.util.Map<java.lang.String,AnnotationValue> getPropertyMap()
getPropertyMap
in interface JavaAnnotation
public AnnotationValue getProperty(java.lang.String name)
getProperty
in interface JavaAnnotation
public java.lang.String toString()
toString
in class java.lang.Object