|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: REQUIRED | OPTIONAL | DETAIL: ELEMENT |
@Target(value=METHOD) @Retention(value=RUNTIME) @Documented public @interface Bean
Annotation used to define new managed beans, including limited/lightweight initialization. For complex initialiation, the XML specification is necessary.
One of the advantages is that, on the XML side, it is always necessary to provide complete class names; here on the Java/annotation side, we can leverage imports.
The managed bean will have a name that matches the property name; this allows such a bean to be
referenced via the "bean:" binding prefix, or via
IComponent.getBeans()
.
This annotation adds a new IBeanSpecification
to the
IComponentSpecification
.
Optional Element Summary | |
---|---|
String |
initializer
Optional initializer string for the bean, as lightweight initialization (a list of properties and values). |
Lifecycle |
lifecycle
The lifecycle of the bean, defaults to Lifecycle.REQUEST. |
Class |
value
The Java class to instantiate. |
public abstract Class value
public abstract String initializer
public abstract Lifecycle lifecycle
BeanLifecycle
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: REQUIRED | OPTIONAL | DETAIL: ELEMENT |