@Target(value=METHOD) @Retention(value=RUNTIME) @Documented public @interface Bean
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
.
Modifier and Type | Optional Element and Description |
---|---|
java.lang.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.
|
java.lang.Class |
value
The Java class to instantiate.
|
public abstract java.lang.Class value
public abstract java.lang.String initializer