Annotation Type BeanFactory.Generate

Enclosing class:
BeanFactory<BeanClass>

@Target(TYPE) @Retention(RUNTIME) public static @interface BeanFactory.Generate
Annotation which will trigger the generation of BeanFactories.

If no value is supplied, a BeanFactory will be generated for the class that the annotation is applied to. So, if you have a custom class for which you would like to generate a BeanFactory, you can just annotate it like this:

 @BeanFactory.Generate
 public MyCanvas extends Canvas {
    ...
 }

If you want to generate BeanFactories for framework classes, you can supply a value for the annotation, where the value is an array of class literals. For instance:

 @BeanFactory.Generate({ListGrid.class, TreeGrid.class})
 public interface EmptyInterface {
 }

Note that when supplying values for the annotation, the class you annotate (here EmptyInterface) will not itself have a BeanFactory generated for it. Thus, you can use an empty inner interface for this purpose.

If you want to generate BeanFactories for all Canvas subclasses or all FormItem subclasses, you can use BeanFactory.CanvasMetaFactory or BeanFactory.FormItemMetaFactory instead. However, that is less efficient if there are only a limited number of classes which need BeanFactories.

See Also:
  • Optional Element Summary

    Optional Elements
    Modifier and Type
    Optional Element
    Description
     
  • Element Details

    • value

      Class[] value
      Default:
      {}