org.beanlet
Annotation Type StaticFactory


@Retention(value=RUNTIME)
@Target(value={CONSTRUCTOR,METHOD,FIELD})
public @interface StaticFactory

Applied to static methods or static fields to denote a factory.

Constructor Constraints

The constructor on which the StaticFactory annotation is applied MUST fulfill all of the following criteria:

Method Constraints

The method on which the StaticFactory annotation is applied MUST fulfill all of the following criteria:

Field Constraints

The field on which the Factory annotation is applied MUST fulfill all of the following criteria:

XML Representation

The following xml-fragment shows how to express this annotation in xml. The italic attribute of the 'static-factory' tag is used to identify the element to which this annotation is applied.
<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">
    <static-factory field="bar"/>
  </beanlet>
</beanlets>



Copyright © 2006-2012. All Rights Reserved.