- java.lang.Object
-
- com.thoughtworks.qdox.model.impl.AbstractJavaModel
-
- com.thoughtworks.qdox.model.impl.DefaultJavaAnnotation
-
- All Implemented Interfaces:
AnnotationValue
,Expression
,JavaAnnotation
,JavaModel
,Serializable
public class DefaultJavaAnnotation extends AbstractJavaModel implements AnnotationValue, Serializable, JavaAnnotation
- Author:
- Eric Redmond
- See Also:
- Serialized Form
-
-
Constructor Summary
Constructors Constructor Description DefaultJavaAnnotation(JavaClass type)
DefaultJavaAnnotation(JavaClass type, Map<String,Object> namedParameters)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description Object
accept(ExpressionVisitor visitor)
Accept a visitor for this value.String
getCodeBlock()
Object
getNamedParameter(String key)
Map<String,Object>
getNamedParameterMap()
DefaultJavaAnnotation
getParameterValue()
Get a parameter value forJavaAnnotation.getNamedParameter(String)
.AnnotationValue
getProperty(String name)
Map<String,AnnotationValue>
getPropertyMap()
JavaClass
getType()
void
setProperty(String name, AnnotationValue value)
String
toString()
-
Methods inherited from class com.thoughtworks.qdox.model.impl.AbstractJavaModel
getLineNumber, getModelWriter, setLineNumber, setModelWriterFactory
-
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
-
Methods inherited from interface com.thoughtworks.qdox.model.JavaModel
getLineNumber
-
-
-
-
Method Detail
-
setProperty
public final void setProperty(String name, AnnotationValue value)
-
getType
public JavaClass getType()
- Specified by:
getType
in interfaceJavaAnnotation
- Returns:
- the annotation type
-
getNamedParameter
public Object getNamedParameter(String key)
- Specified by:
getNamedParameter
in interfaceJavaAnnotation
-
getNamedParameterMap
public Map<String,Object> getNamedParameterMap()
- Specified by:
getNamedParameterMap
in interfaceJavaAnnotation
-
getCodeBlock
public String getCodeBlock()
- Specified by:
getCodeBlock
in interfaceJavaModel
- Returns:
- the codeblock
-
accept
public Object accept(ExpressionVisitor visitor)
Accept a visitor for this value.- Specified by:
accept
in interfaceAnnotationValue
- Parameters:
visitor
- Visitor- Returns:
- Visitor result
-
getParameterValue
public DefaultJavaAnnotation getParameterValue()
Get a parameter value forJavaAnnotation.getNamedParameter(String)
.- Specified by:
getParameterValue
in interfaceExpression
- Returns:
- Parameter value
-
getPropertyMap
public Map<String,AnnotationValue> getPropertyMap()
- Specified by:
getPropertyMap
in interfaceJavaAnnotation
-
getProperty
public AnnotationValue getProperty(String name)
- Specified by:
getProperty
in interfaceJavaAnnotation
-
-