org.apache.felix.scr.annotations

## Annotation Type Component

Deprecated.
Use the OSGi annotations from org.osgi.service.component.annotations.*

    @Target(value=TYPE)
    @Retention(value=CLASS)
    @Deprecated
    public @interface Component

The `Component` annotation is the only required annotation. If this annotation is not declared in a Java class, the class is not declared as a component.

This annotation is used to declare the <component> element of the component declaration. See section 112.4.3, Component Element, in the OSGi Service Platform Service Compendium Specification for more information. The required <implementation> element is automatically generated with the fully qualified name of the class containing the `Component` annotation.

### Optional Element Summary

Optional Elements
`boolean` `componentAbstract` Deprecated. This feature will not be supported in future versions.
`boolean` `configurationFactory` Deprecated. Set the metatype factory pid property (only for non factory components).
`String` `configurationPid` Deprecated. The configuration pid.
`boolean` `createPid` Deprecated. This property is handled by the Declarative Service Implementation therefore it should never be created by hand.
`String` `description` Deprecated. This is generally used as a description for the object described by the meta type.
`boolean` `ds` Deprecated. Whether Declarative Services descriptor is generated or not.
`boolean` `enabled` Deprecated. Whether the component is enabled when the bundle starts.
`String` `factory` Deprecated. Whether the component is a factory component.
`boolean` `immediate` Deprecated. Whether the component is immediately activated.
`boolean` `inherit` Deprecated. This feature will not be supported in future versions.
`String` `label` Deprecated. This is generally used as a title for the object described by the meta type.
`boolean` `metatype` Deprecated. Whether Metatype Service data is generated or not.
`String` `name` Deprecated. Defines the Component name also used as the PID for the Configuration Admin Service.
`ConfigurationPolicy` `policy` Deprecated. The configuration policy
`String` `specVersion` Deprecated. The version of the Declarative Services specification against which the component is written.

### Element Detail

#### name

    public abstract String name

Deprecated.
Defines the Component name also used as the PID for the Configuration Admin Service. Default value: Fully qualified name of the Java class.

Default:
  ""

#### label

    public abstract String label

Deprecated.
This is generally used as a title for the object described by the meta type. This name may be localized by prepending a % sign to the name. Default value: %<name>.name

Default:
  ""

#### description

    public abstract String description

Deprecated.
This is generally used as a description for the object described by the meta type. This name may be localized by prepending a % sign to the name. Default value: %<name>.description

Default:
  ""

#### enabled

    public abstract boolean enabled

Deprecated.
Whether the component is enabled when the bundle starts.

Default:
  true

#### factory

    public abstract String factory

Deprecated.
Whether the component is a factory component.

Default:
  ""

#### immediate

    public abstract boolean immediate

Deprecated.
Whether the component is immediately activated.

Default:
  false

#### inherit

    public abstract boolean inherit

Deprecated. This feature will not be supported in future versions.
Whether any service, property and reference declarations from base classes should be inherited by this class.

Default:
  true

#### metatype

    public abstract boolean metatype

Deprecated.
Whether Metatype Service data is generated or not. If this parameter is set to true Metatype Service data is generated in the `metatype.xml` file for this component. Otherwise no Metatype Service data is generated for this component.

Default:
  false

#### componentAbstract

    public abstract boolean componentAbstract

Deprecated. This feature will not be supported in future versions.
This marks an abstract service description which is not added to the descriptor but intended for reuse through inheritance. This attribute defaults to true for abstract classes and false for concrete classes.

Default:
  false

#### ds

    public abstract boolean ds

Deprecated.
Whether Declarative Services descriptor is generated or not. If this parameter is not set or set to true the Declarative Services descriptor is generated in the service descriptor file for this component. Otherwise no Declarative Services descriptor is generated for this component.

Default:
  true

#### specVersion

    public abstract String specVersion

Deprecated.
The version of the Declarative Services specification against which the component is written. Generally, the Maven SCR Plugin is able to automatically detect which specification version a Component is written against. There are some cases, though, where this is not easily or reliably possible. In these cases use this attribute to force the specification version.

Valid values currently are `1.0` and `1.1`. If an unsupported value is declared, a descriptor failure results.

Since:
  1.0.1

Default:
  ""

#### createPid

    public abstract boolean createPid

Deprecated. This property is handled by the Declarative Service Implementation therefore it should never be created by hand.
Generated `service.pid` property by default, if none declared explicitly.

Default:
  false

#### configurationFactory

    public abstract boolean configurationFactory

Deprecated.
Set the metatype factory pid property (only for non factory components).

Since:
  1.3

Default:
  false

#### policy

    public abstract ConfigurationPolicy policy

Deprecated.
The configuration policy

Since:
  1.0

Default:
  org.apache.felix.scr.annotations.ConfigurationPolicy.OPTIONAL

#### configurationPid

    public abstract String configurationPid

Deprecated.
The configuration pid. The default value for this is the name of the component.

Since:
  1.7

Default:
  ""