com.thoughtworks.qdox.model
Class Annotation

java.lang.Object
  extended by com.thoughtworks.qdox.model.Annotation
All Implemented Interfaces:
AnnotationValue, Serializable

public class Annotation
extends Object
implements AnnotationValue, Serializable

Author:
Eric Redmond
See Also:
Serialized Form

Constructor Summary
Annotation(Type type, AbstractBaseJavaEntity context, Map namedParameters, int lineNumber)
           
Annotation(Type type, int line)
           
 
Method Summary
 Object accept(AnnotationVisitor visitor)
          Accept a visitor for this value.
 AbstractBaseJavaEntity getContext()
           
 int getLineNumber()
           
 Object getNamedParameter(String key)
           
 Map getNamedParameterMap()
           
 Object getParameterValue()
          Get a parameter value for getNamedParameter(String).
 AnnotationValue getProperty(String name)
           
 Map getPropertyMap()
           
 Type getType()
           
 void setContext(AbstractBaseJavaEntity context)
           
 void setProperty(String name, AnnotationValue value)
           
 String toString()
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

Annotation

public Annotation(Type type,
                  AbstractBaseJavaEntity context,
                  Map namedParameters,
                  int lineNumber)

Annotation

public Annotation(Type type,
                  int line)
Method Detail

setProperty

public void setProperty(String name,
                        AnnotationValue value)

getType

public Type getType()
Returns:
the annotation type

getNamedParameter

public Object getNamedParameter(String key)
Parameters:
key - name of a named-parameter
Returns:
the corresponding value, or null if no such named-parameter was present

getNamedParameterMap

public Map getNamedParameterMap()
Returns:
a Map containing all the named-parameters

getContext

public final AbstractBaseJavaEntity getContext()

getLineNumber

public int getLineNumber()

accept

public Object accept(AnnotationVisitor visitor)
Description copied from interface: AnnotationValue
Accept a visitor for this value.

Specified by:
accept in interface AnnotationValue
Parameters:
visitor - Visitor
Returns:
Visitor result

getParameterValue

public Object getParameterValue()
Description copied from interface: AnnotationValue
Get a parameter value for getNamedParameter(String).

Specified by:
getParameterValue in interface AnnotationValue
Returns:
Parameter value

getPropertyMap

public Map getPropertyMap()

getProperty

public AnnotationValue getProperty(String name)

setContext

public void setContext(AbstractBaseJavaEntity context)

toString

public String toString()
Overrides:
toString in class Object


Copyright © 2002-2011. All Rights Reserved.