Class BeanHandlerImpl

    • Constructor Detail

      • BeanHandlerImpl

        public BeanHandlerImpl()
    • Method Detail

      • autowire

        public <T> T autowire​(Class<T> type)
        Description copied from interface: BeanHandler
        Instantiates a bean of the given type and autowire it's dependencies
        Specified by:
        autowire in interface BeanHandler
      • autowire

        public <T> T autowire​(Object object)
        Description copied from interface: BeanHandler
        Initializes the given bean, autowiring it's dependencies
        Specified by:
        autowire in interface BeanHandler
      • autowireWithArgs

        public <T> T autowireWithArgs​(Class<T> type,
                                      Object... constructorArgs)
        Description copied from interface: BeanHandler
        Instantiates a bean of the given type using the given constructor arguments, and autowire it's dependencies
        Specified by:
        autowireWithArgs in interface BeanHandler
      • customBean

        public <T extends CustomBean> T customBean​(Class<T> expectedType,
                                                   String className)
        Description copied from interface: BeanHandler
        Creates a custom bean, that is, a bean whose interface is known, but the implementation class name is dynamic
        Specified by:
        customBean in interface BeanHandler
      • destroy

        @PreDestroy
        public void destroy()
      • getBean

        public <T> T getBean​(Class<T> type)
        Description copied from interface: BeanHandler
        Returns a cacheable singleton bean by class, autowired with the context.
        Specified by:
        getBean in interface BeanHandler
      • getBean

        public <T extends CustomBean> T getBean​(Class<T> expectedType,
                                                String className)
        Description copied from interface: BeanHandler
        Returns a cacheable singleton bean by classname, autowired with the context.
        Specified by:
        getBean in interface BeanHandler
      • instantiate

        public <T> T instantiate​(Class<T> type)
        Description copied from interface: BeanHandler
        Instantiates a bean of the given type
        Specified by:
        instantiate in interface BeanHandler
      • instantiateWithArgs

        public <T> T instantiateWithArgs​(Class<T> type,
                                         Object... constructorArgs)
        Description copied from interface: BeanHandler
        Instantiates a bean of the given type with constructor arguments
        Specified by:
        instantiateWithArgs in interface BeanHandler