org.apache.felix.scrplugin.annotations

## Class ScannedAnnotation

- java.lang.Object
- - org.apache.felix.scrplugin.annotations.ScannedAnnotation

Direct Known Subclasses:
  ClassAnnotation, FieldAnnotation, MethodAnnotation

    public abstract class ScannedAnnotation
    extends Object

Base class for all annotation.

### Field Summary

Fields
`protected String` `name` The fully qualified class name
`protected Map<String,Object>` `values` The annotation values.

### Constructor Summary

Constructors
Constructor and Description
`ScannedAnnotation(String name, Map<String,Object> values)` Create a new description

### Method Summary

All Methods Instance Methods Concrete Methods
`boolean` `getBooleanValue(String name, boolean defaultValue)` Get a boolean value of the annotation
`String` `getEnumValue(String name, String defaultValue)` Get an enumeration value of the annotation
`int` `getIntegerValue(String name, int defaultValue)` Get an integer value of the annotation
`long` `getLongValue(String name, long defaultValue)` Get a long value of the annotation
`String` `getName()` Get the fully qualified class name of the annotation.
`String` `getSimpleName()` Get the simple name of the annotation
`String` `getStringValue(String name, String defaultValue)` Get a string value of the annotation
`Object` `getValue(String paramName)` Get a property value of the annotation.
`boolean` `hasValue(String paramName)` Check if a value exists for this annotation.
`String` `toString()`

### Methods inherited from class java.lang.Object

`clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait`

### Field Detail

#### name

    protected final String name

The fully qualified class name

#### values

    protected final Map<String,Object> values

The annotation values.

### Constructor Detail

#### ScannedAnnotation

    public ScannedAnnotation(String name,
                             Map<String,Object> values)

Create a new description

Parameters:
  `name` - The fully qualified class name of the annotation
  `values` - The properties of the annotation (optional)

### Method Detail

#### getName

    public String getName()

Get the fully qualified class name of the annotation.

Returns:
  The fully qualified class name of the annotation.

#### getSimpleName

    public String getSimpleName()

Get the simple name of the annotation

#### hasValue

    public boolean hasValue(String paramName)

Check if a value exists for this annotation. This method can be used to check whether a value exists, even if the value is `null`.

Parameters:
  `paramName` - The property name
Returns:
  `true` If a value exists.

#### getValue

    public Object getValue(String paramName)

Get a property value of the annotation.

Parameters:
  `paramName` - The property name.
Returns:
  The value of the property or `null`

#### getBooleanValue

    public boolean getBooleanValue(String name,
                                   boolean defaultValue)

Get a boolean value of the annotation

Parameters:
  `name` - The property name
  `defaultValue` - A default value if the property is not set
Returns:
  The property value or the default value.

#### getIntegerValue

    public int getIntegerValue(String name,
                               int defaultValue)

Get an integer value of the annotation

Parameters:
  `name` - The property name
  `defaultValue` - A default value if the property is not set
Returns:
  The property value or the default value.

#### getLongValue

    public long getLongValue(String name,
                             long defaultValue)

Get a long value of the annotation

Parameters:
  `name` - The property name
  `defaultValue` - A default value if the property is not set
Returns:
  The property value or the default value.

#### getStringValue

    public String getStringValue(String name,
                                 String defaultValue)

Get a string value of the annotation

Parameters:
  `name` - The property name
  `defaultValue` - A default value if the property is not set
Returns:
  The property value or the default value.

#### getEnumValue

    public String getEnumValue(String name,
                               String defaultValue)

Get an enumeration value of the annotation

Parameters:
  `name` - The property name
  `defaultValue` - A default value if the property is not set
Returns:
  The property value or the default value.

#### toString

    public String toString()

Overrides:
  `toString` in class `Object`