Package com.thoughtworks.qdox.model
Class Annotation
- java.lang.Object
-
- com.thoughtworks.qdox.model.Annotation
-
- All Implemented Interfaces:
AnnotationValue
,java.io.Serializable
public class Annotation extends java.lang.Object implements AnnotationValue, java.io.Serializable
- Author:
- Eric Redmond
- See Also:
- Serialized Form
-
-
Constructor Summary
Constructors Constructor Description Annotation(Type type, int line)
Annotation(Type type, AbstractBaseJavaEntity context, java.util.Map namedParameters, int lineNumber)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description java.lang.Object
accept(AnnotationVisitor visitor)
Accept a visitor for this value.AbstractBaseJavaEntity
getContext()
int
getLineNumber()
java.lang.Object
getNamedParameter(java.lang.String key)
java.util.Map
getNamedParameterMap()
java.lang.Object
getParameterValue()
Get a parameter value forgetNamedParameter(String)
.AnnotationValue
getProperty(java.lang.String name)
java.util.Map
getPropertyMap()
Type
getType()
void
setContext(AbstractBaseJavaEntity context)
void
setProperty(java.lang.String name, AnnotationValue value)
java.lang.String
toString()
-
-
-
Constructor Detail
-
Annotation
public Annotation(Type type, AbstractBaseJavaEntity context, java.util.Map namedParameters, int lineNumber)
-
Annotation
public Annotation(Type type, int line)
-
-
Method Detail
-
setProperty
public void setProperty(java.lang.String name, AnnotationValue value)
-
getType
public Type getType()
- Returns:
- the annotation type
-
getNamedParameter
public java.lang.Object getNamedParameter(java.lang.String key)
- Parameters:
key
- name of a named-parameter- Returns:
- the corresponding value, or null if no such named-parameter was present
-
getNamedParameterMap
public java.util.Map getNamedParameterMap()
- Returns:
- a Map containing all the named-parameters
-
getContext
public final AbstractBaseJavaEntity getContext()
-
getLineNumber
public int getLineNumber()
-
accept
public java.lang.Object accept(AnnotationVisitor visitor)
Description copied from interface:AnnotationValue
Accept a visitor for this value.- Specified by:
accept
in interfaceAnnotationValue
- Parameters:
visitor
- Visitor- Returns:
- Visitor result
-
getParameterValue
public java.lang.Object getParameterValue()
Description copied from interface:AnnotationValue
Get a parameter value forgetNamedParameter(String)
.- Specified by:
getParameterValue
in interfaceAnnotationValue
- Returns:
- Parameter value
-
getPropertyMap
public java.util.Map getPropertyMap()
-
getProperty
public AnnotationValue getProperty(java.lang.String name)
-
setContext
public void setContext(AbstractBaseJavaEntity context)
-
toString
public java.lang.String toString()
- Overrides:
toString
in classjava.lang.Object
-
-