Annotation
Date: 2017-03-29

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

  See Also:
    Serialized Form

- - ### Constructor Summary

    Constructors
    Constructor and Description
    `Annotation(Type type, AbstractBaseJavaEntity context, java.util.Map namedParameters, int lineNumber)`
    `Annotation(Type type, int line)`

  - ### Method Summary

    Methods
    Modifier and Type | Method and 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 for `getNamedParameter(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()`

    - ### 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,
                    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 interface `AnnotationValue`
      Parameters:
        `visitor` - Visitor
      Returns:
        Visitor result

    - #### getParameterValue

          public java.lang.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 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 class `java.lang.Object`