|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object org.axonframework.contextsupport.spring.AutowiredBean
public final class AutowiredBean
Special type of BeanDefinition that references can be use to explicitly define a property as being autowired. Autowiring is only successful if exactly one bean is available of the given type.
Internally, this BeanDefinition creates a FactoryBean definition that loads the class from the application context.
Method Summary | |
---|---|
static org.springframework.beans.factory.support.GenericBeanDefinition |
createAutowiredBean(Class<?>... autowiredTypes)
Creates an autowired dependency on the given autowiredTypes . |
static org.springframework.beans.factory.support.GenericBeanDefinition |
createAutowiredBeanWithFallback(Object fallback,
Class<?>... autowiredTypes)
Creates an autowired dependency on the given autowiredTypes . |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Method Detail |
---|
public static org.springframework.beans.factory.support.GenericBeanDefinition createAutowiredBean(Class<?>... autowiredTypes)
autowiredTypes
. A lookup is done on the first type,
if no beans of that type are found, the next is evaluated, and so on. If more than one bean of any type is found
when it is evaluated, an exception is thrown.
Beans that are not eligible for autowiring (as defined in Spring configuration) are ignored altogether.
autowiredTypes
- The types of bean to autowire.
public static org.springframework.beans.factory.support.GenericBeanDefinition createAutowiredBeanWithFallback(Object fallback, Class<?>... autowiredTypes)
autowiredTypes
. A lookup is done on the first type,
if no beans of that type are found, the next is evaluated, and so on. If more than one bean of any type is found
when it is evaluated, an exception is thrown.
If there are no autowire candidates, the given fallback
is used to take its place. If
fallback
is null
, an exception will be thrown.
Beans that are not eligible for autowiring (as defined in Spring configuration) are ignored altogether.
fallback
- The bean to select when no autowired dependencies can be foundautowiredTypes
- The types of bean to autowire.
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |