Interface AlohaBeanFactory

  • All Known Implementing Classes:
    AlohaBeanFactoryImpl

    public interface AlohaBeanFactory
    This is the interface of a class to create a class and configure it with all the common used beans it needs.
    • Method Summary

      All Methods Instance Methods Abstract Methods 
      Modifier and Type Method Description
      <T> void configure​(T beanUser)
      configures the given instance.
      <T> T create​(java.lang.Class<? extends T> clazz)
      creates an instance of the given class and configures it correctly with all the aloha-beans as given by its interfaces derived from BeanAware
    • Method Detail

      • create

        <T> T create​(java.lang.Class<? extends T> clazz)
        creates an instance of the given class and configures it correctly with all the aloha-beans as given by its interfaces derived from BeanAware
        Type Parameters:
        T -
        Parameters:
        clazz - the class for which to create an instance
        Returns:
        a fully configured instancs
      • configure

        <T> void configure​(T beanUser)
        configures the given instance. This can be used, e.g. the bean has no default constructor. So it can be created with the new operator and then configured afterwards.
        Type Parameters:
        T -
        Parameters:
        beanUser - the bean to configure