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
Version:
$Id: Component.java 21281 2009-06-13 19:22:09Z sdumitriu $

Optional Element Summary
 java.lang.String[] hints
          Sometimes you want to register the component several times with different hints.
 java.lang.Class<?>[] roles
          When specified forces the component to be registered as many times as there are roles specified.
 java.lang.String value
          The hint value.
 

value

public abstract java.lang.String value
The hint value. Can be any text value. It's used to differentiate one component implementation from another one.

Default:
""

hints

public abstract java.lang.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 java.lang.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:
{}


Copyright © 2004-2011 XWiki. All Rights Reserved.