Class DefaultBeanRegistry
java.lang.Object
com.aspectran.core.component.AbstractComponent
com.aspectran.core.component.bean.DefaultBeanRegistry
- All Implemented Interfaces:
BeanRegistry
,Component
The Class DefaultBeanRegistry.
Created: 2009. 03. 09 PM 23:48:09
-
Constructor Summary
ConstructorsConstructorDescriptionDefaultBeanRegistry
(ActivityContext context, BeanRuleRegistry beanRuleRegistry) -
Method Summary
Modifier and TypeMethodDescriptionboolean
containsBean
(Class<?> type) Return whether a bean with the specified object type is present.boolean
containsBean
(Class<?> type, String id) Returns whether the bean corresponding to the specified object type and ID exists.boolean
containsBean
(String id) Return whether a bean with the specified id is present.protected Object
createBean
(BeanRule beanRule) protected Object
createBean
(BeanRule beanRule, Scope scope) void
destroySingleton
(Object bean) protected void
protected void
Collection<Class<?>>
findConfigBeanClassesWithAnnotation
(Class<? extends Annotation> annotationType) protected ActivityContext
protected <V> V
<V> V
Returns the bean instance that uniquely matches the given object type.<V> V
Returns an instance of the bean that matches the given object type.<V> V
Returns an instance of the bean that matches the given id.protected BeanRuleRegistry
<V> V[]
getBeansOfType
(Class<V> type) protected Object
getFactoryProducedObject
(BeanRule beanRule, Object bean) <V> V
getPrototypeScopeBean
(BeanRule beanRule) boolean
hasSingleton
(Class<?> type) boolean
hasSingleton
(Class<?> type, String id) boolean
hasSingleton
(Object bean) Methods inherited from class com.aspectran.core.component.AbstractComponent
destroy, getComponentName, initialize, isAvailable, isDestroyed, isDestroying, isInitialized
-
Constructor Details
-
DefaultBeanRegistry
-
-
Method Details
-
getBean
Description copied from interface:BeanRegistry
Returns an instance of the bean that matches the given id.- Type Parameters:
V
- the type of bean object retrieved- Parameters:
id
- the id of the bean to retrieve- Returns:
- an instance of the bean
-
getBean
Description copied from interface:BeanRegistry
Returns the bean instance that uniquely matches the given object type.- Type Parameters:
V
- the type of bean object retrieved- Parameters:
type
- the type the bean must match; can be an interface or superclass- Returns:
- an instance of the bean
-
getBean
Description copied from interface:BeanRegistry
Returns an instance of the bean that matches the given object type. If more than one matching bean is found, we pick a bean that matches the given id.- Type Parameters:
V
- the type of bean object retrieved- Parameters:
type
- type the bean must match; can be an interface or superclassid
- the id of the bean to retrieve- Returns:
- an instance of the bean
-
getBeansOfType
-
containsBean
Description copied from interface:BeanRegistry
Return whether a bean with the specified id is present.- Parameters:
id
- the id of the bean to query- Returns:
- whether a bean with the specified id is present
-
containsBean
Description copied from interface:BeanRegistry
Return whether a bean with the specified object type is present.- Parameters:
type
- the object type of the bean to query- Returns:
- whether a bean with the specified type is present
-
containsBean
Description copied from interface:BeanRegistry
Returns whether the bean corresponding to the specified object type and ID exists.- Parameters:
type
- the object type of the bean to queryid
- the id of the bean to query- Returns:
- whether a bean with the specified type is present
-
findConfigBeanClassesWithAnnotation
public Collection<Class<?>> findConfigBeanClassesWithAnnotation(Class<? extends Annotation> annotationType) -
getBeanRuleRegistry
-
getBean
-
getPrototypeScopeBean
- Specified by:
getPrototypeScopeBean
in interfaceBeanRegistry
-
hasSingleton
- Specified by:
hasSingleton
in interfaceBeanRegistry
-
hasSingleton
- Specified by:
hasSingleton
in interfaceBeanRegistry
-
hasSingleton
- Specified by:
hasSingleton
in interfaceBeanRegistry
-
destroySingleton
- Specified by:
destroySingleton
in interfaceBeanRegistry
- Throws:
Exception
-
doInitialize
- Specified by:
doInitialize
in classAbstractComponent
- Throws:
Exception
-
doDestroy
- Specified by:
doDestroy
in classAbstractComponent
- Throws:
Exception
-
getActivityContext
-
createBean
-
createBean
-
getFactoryProducedObject
-