org.apache.felix.scrplugin.description

## Class ClassDescription

- java.lang.Object
- - org.apache.felix.scrplugin.description.ClassDescription

    public class ClassDescription
    extends Object

A `ClassDescription` is describing the found annotations of a class. Its basically used as a wrapper to hold all the various annotations found in a class. This description only contains the annotations found in the current class, but not in any superclass. The annotations are available as descriptions.

See Also:
  `ComponentDescription`, `ServiceDescription`, `ReferenceDescription`, `PropertyDescription`

### Constructor Summary

Constructors
Constructor and Description
`ClassDescription(Class<?> describedClass, String source)` Create a new class description

### Method Summary

All Methods Instance Methods Concrete Methods
`void` `add(AbstractDescription desc)` Add a new description
`ClassDescription` `clone()`
`Class<?>` `getDescribedClass()` Get the associated class.
`<T extends AbstractDescription> T` `getDescription(Class<T> descType)` Get the first description of that type
`<T extends AbstractDescription> List<T>` `getDescriptions(Class<T> descType)` Get all descriptions of that type.
`String` `getSource()` Get the location information like the source file etc.
`String` `toString()`

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

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

### Constructor Detail

#### ClassDescription

    public ClassDescription(Class<?> describedClass,
                            String source)

Create a new class description

### Method Detail

#### getDescribedClass

    public Class<?> getDescribedClass()

Get the associated class.

Returns:
  The associated class.

#### getSource

    public String getSource()

Get the location information like the source file etc.

Returns:
  The location information.

#### add

    public void add(AbstractDescription desc)

Add a new description

#### getDescriptions

    public <T extends AbstractDescription> List<T> getDescriptions(Class<T> descType)

Get all descriptions of that type.

Parameters:
  `descType` - The description class.
Returns:
  A list of found descriptions or the empty array.

#### getDescription

    public <T extends AbstractDescription> T getDescription(Class<T> descType)

Get the first description of that type

Parameters:
  `descType` - The description class
Returns:
  THe first description or `null`

#### toString

    public String toString()

Overrides:
  `toString` in class `Object`

#### clone

    public ClassDescription clone()

Overrides:
  `clone` in class `Object`