Package org.cyclos.impl
Interface BeanHandler
-
public interface BeanHandlerHandler for spring bean management
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description <T> Tautowire(Class<T> type)Instantiates a bean of the given type and autowire it's dependencies<T> Tautowire(Object object)Initializes the given bean, autowiring it's dependencies<T> TautowireWithArgs(Class<T> type, Object... constructorArgs)Instantiates a bean of the given type using the given constructor arguments, and autowire it's dependencies<T extends CustomBean>
TcustomBean(Class<T> expectedType, String className)Creates a custom bean, that is, a bean whose interface is known, but the implementation class name is dynamicvoiddestroy(Object bean)Destroys a bean.<T> TgetBean(Class<T> type)Returns a cacheable singleton bean by class, autowired with the context.<T extends CustomBean>
TgetBean(Class<T> expectedType, String className)Returns a cacheable singleton bean by classname, autowired with the context.<T> Tinstantiate(Class<T> type)Instantiates a bean of the given type<T> TinstantiateWithArgs(Class<T> type, Object... constructorArgs)Instantiates a bean of the given type with constructor arguments
-
-
-
Method Detail
-
autowire
<T> T autowire(Class<T> type)
Instantiates a bean of the given type and autowire it's dependencies
-
autowire
<T> T autowire(Object object)
Initializes the given bean, autowiring it's dependencies
-
autowireWithArgs
<T> T autowireWithArgs(Class<T> type, Object... constructorArgs)
Instantiates a bean of the given type using the given constructor arguments, and autowire it's dependencies
-
customBean
<T extends CustomBean> T customBean(Class<T> expectedType, String className)
Creates a custom bean, that is, a bean whose interface is known, but the implementation class name is dynamic
-
destroy
void destroy(Object bean)
Destroys a bean. If it implementsDisposableBean, invoke it'sDisposableBean.destroy()method. Also invokes every zero-argument method annotated withPreDestroy.
-
getBean
<T> T getBean(Class<T> type)
Returns a cacheable singleton bean by class, autowired with the context.
-
getBean
<T extends CustomBean> T getBean(Class<T> expectedType, String className)
Returns a cacheable singleton bean by classname, autowired with the context.
-
instantiate
<T> T instantiate(Class<T> type)
Instantiates a bean of the given type
-
-