T - The typepublic class BeanRegistration<T> extends Object implements Ordered, CreatedBean<T>, BeanType<T>
A bean registration is an association between a BeanDefinition and a created bean, typically a
Singleton.
HIGHEST_PRECEDENCE, LOWEST_PRECEDENCEEMPTY| Constructor and Description |
|---|
BeanRegistration(BeanIdentifier identifier,
BeanDefinition<T> beanDefinition,
T bean) |
| Modifier and Type | Method and Description |
|---|---|
T |
bean() |
void |
close()
Destroy the bean entry, performing any shutdown and releasing any dependent objects.
|
BeanDefinition<T> |
definition() |
boolean |
equals(Object o) |
T |
getBean() |
BeanDefinition<T> |
getBeanDefinition() |
Class<T> |
getBeanType()
Returns the bean type.
|
BeanIdentifier |
getIdentifier() |
int |
getOrder() |
int |
hashCode() |
BeanIdentifier |
id()
Returns an ID that is unique to the bean and can be used to cache the instance if necessary.
|
boolean |
isEnabled(BeanContext context,
BeanResolutionContext resolutionContext)
Return whether this component is enabled for the given context.
|
String |
toString() |
clone, finalize, getClass, notify, notifyAll, wait, wait, waitgetExposedTypes, getName, isCandidateBean, isContainerType, isPrimary, requiresMethodProcessingfindAnnotation, findAnnotation, findDeclaredAnnotation, findDeclaredAnnotation, getAnnotationMetadata, isAnnotationPresent, isDeclaredAnnotationPresent, synthesize, synthesizeAll, synthesizeAnnotationsByType, synthesizeDeclared, synthesizeDeclared, synthesizeDeclaredAnnotationsByTypegetAnnotation, getAnnotation, getDeclaredAnnotation, getDeclaredAnnotation, isAnnotationPresent, isDeclaredAnnotationPresent, synthesize, synthesizeDeclaredisEnabledpublic BeanRegistration(BeanIdentifier identifier, BeanDefinition<T> beanDefinition, T bean)
identifier - The bean identifierbeanDefinition - The bean definitionbean - The bean instancepublic int getOrder()
public BeanIdentifier getIdentifier()
public BeanDefinition<T> getBeanDefinition()
public T getBean()
public BeanDefinition<T> definition()
definition in interface CreatedBean<T>@NonNull public T bean()
bean in interface CreatedBean<T>public BeanIdentifier id()
CreatedBeanid in interface CreatedBean<T>public void close()
CreatedBeanclose in interface CreatedBean<T>close in interface Closeableclose in interface AutoCloseablepublic boolean isEnabled(BeanContext context, BeanResolutionContext resolutionContext)
BeanContextConditionalisEnabled in interface BeanContextConditionalcontext - The contextresolutionContext - The bean resolution context