Interface AutoBeanFactory

All Known Subinterfaces:
InProcessRequestFactory.Factory, MessageFactory

public interface AutoBeanFactory
A tag interface for the AutoBean generator. Instances of AutoBeans are created by declaring factory methods on a subtype of this interface.

Simple interfaces, consisting of only getters and setters, can be constructed with a no-arg method. Non-simple interfaces must provide a delegate object to implement a non-simple interface or use a AutoBeanFactory.Category.

 interface MyFactory extends AutoBeanFactory {
   // A factory method for a simple bean
   AutoBean<BeanInterface> beanInterface();
   // A factory method for a wrapper bean
   AutoBean<ArbitraryInterface> wrapper(ArbitraryInterface delegate);
 }
 
See Also:
  • Nested Class Summary

    Nested Classes
    Modifier and Type
    Interface
    Description
    static @interface 
    Allows non-property methods on simple bean implementations when applied.
    static @interface 
    The types specified by this annotation will not be wrapped by an AutoBean when returned from an AutoBean-controlled method.
  • Method Summary

    Modifier and Type
    Method
    Description
    <T> AutoBean<T>
    create(Class<T> clazz)
    Allows dynamic creation of AutoBean instances based on declared parameterizations.
    <T, U extends T>
    AutoBean<T>
    create(Class<T> clazz, U delegate)
    Allows dynamic creation of wrapped AutoBean instances based on declared parameterizations.
  • Method Details

    • create

      <T> AutoBean<T> create(Class<T> clazz)
      Allows dynamic creation of AutoBean instances based on declared parameterizations.
      Type Parameters:
      T - the parameterization of the created AutoBean
      Parameters:
      clazz - the Class of type T of the new instance
      Returns:
      an AutoBean of type T or null if the interface type is unknown to the factory
    • create

      <T, U extends T> AutoBean<T> create(Class<T> clazz, U delegate)
      Allows dynamic creation of wrapped AutoBean instances based on declared parameterizations.
      Type Parameters:
      T - the parameterization of the created AutoBean
      U - the delegate's type, a subtype of T
      Parameters:
      clazz - the Class of type T of the new instance
      delegate - a delegate that extends type T
      Returns:
      an AutoBean of type T or null if the interface type is unknown to the factory