org.beanlet
Annotation Type Factory
@Retention(value=RUNTIME)
@Target(value=METHOD)
public @interface Factory
Beanlets implementing this annotation can act as a factory.
Method Constraints
The method on which the Call annotation is applied MUST fulfill all
of the following criteria:
- The method MUST NOT have any parameters.
- The return type of the method MAY be
void or Object
(covariant return types are allowed).
- The method MAY throw a checked exception.
- The method on which
Factory is applied MAY be public,
protected, package private or private.
- The method MUST NOT be
static.
- The method MAY be
final.
XML Representation
The following xml-fragment shows how to express this annotation in xml. The italic attribute of the 'factory' tag is used to identify the element to which this annotation is applied. The other attribute can be specified optionally if the annotation specifies a default value for the particular annotation method.
<beanlets xmlns="http://beanlet.org/schema/beanlet"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://beanlet.org/schema/beanlet http://beanlet.org/schema/beanlet/beanlet_1_0.xsd">
<beanlet name="foo" type="com.acme.Foo">
<factory method="bar" description=""/>
</beanlet>
</beanlets>
- See Also:
FactoryBeanlet
description
public abstract String description
- Default:
- ""
Copyright © 2006-2008. All Rights Reserved.