org.xwiki.component.annotation
Annotation Type Component


@Documented
@Retention(value=RUNTIME)
@Target(value=TYPE)
@Inherited
public @interface Component

Defines a component implementation. A hint can be specified to differentiate this implementation from another one.

Since:
1.8.1

Optional Element Summary
 String[] hints
          Sometimes you want to register the component several times with different hints.
 Class<?>[] roles
          When specified forces the component to be registered as many times as there are roles specified.
 String value
          Deprecated. since 3.1M1 use the @Named annotation instead
 

value

@Deprecated
public abstract String value
Deprecated. since 3.1M1 use the @Named annotation instead

The hint value. Can be any text value. It's used to differentiate one component implementation from another one.

Default:
""

hints

public abstract String[] hints
Sometimes you want to register the component several times with different hints. In this case the default annotation value is ignored and the passed list of hints is used instead.

Default:
{}

roles

public abstract Class<?>[] roles
When specified forces the component to be registered as many times as there are roles specified. Otherwise the superclass/interface hierarchy is scanned for ComponentRole annotations and the component is registered under all roles found.

Default:
{}