@Internal public final class DefaultBeanResolutionContext extends AbstractBeanResolutionContext
BeanResolutionContext
.AbstractBeanResolutionContext.AnnotationSegment, AbstractBeanResolutionContext.ConstructorArgumentSegment, AbstractBeanResolutionContext.ConstructorSegment, AbstractBeanResolutionContext.FieldSegment, AbstractBeanResolutionContext.MethodArgumentSegment, AbstractBeanResolutionContext.MethodSegment
BeanResolutionContext.Path, BeanResolutionContext.Segment<T>
context, path, rootDefinition
Constructor and Description |
---|
DefaultBeanResolutionContext(BeanContext context,
BeanDefinition<?> rootDefinition) |
Modifier and Type | Method and Description |
---|---|
<T> void |
addInFlightBean(BeanIdentifier beanIdentifier,
BeanRegistration<T> beanRegistration)
Adds a bean that is created as part of the resolution.
|
void |
close() |
BeanResolutionContext |
copy()
Copy current context to be used later.
|
<T> BeanRegistration<T> |
getInFlightBean(BeanIdentifier beanIdentifier)
Obtains an inflight bean for the given identifier.
|
void |
removeInFlightBean(BeanIdentifier beanIdentifier)
Removes a bean that is in the process of being created.
|
addDependentBean, copyStateFrom, destroyInjectScopedBeans, findBean, get, get, getAndResetDependentBeans, getAndResetDependentFactoryBean, getAttribute, getBean, getBeanRegistrations, getBeansOfType, getContext, getCurrentQualifier, getPath, getRootDefinition, inject, markDependentAsFactory, onNewSegment, popDependentBeans, pushDependentBeans, removeAttribute, setAttribute, setCurrentQualifier, streamOfType
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
get, get
public DefaultBeanResolutionContext(BeanContext context, BeanDefinition<?> rootDefinition)
context
- The bean contextrootDefinition
- The bean root definitionpublic BeanResolutionContext copy()
BeanResolutionContext
public void close()
public <T> void addInFlightBean(BeanIdentifier beanIdentifier, BeanRegistration<T> beanRegistration)
BeanResolutionContext
BeanContext.inject(Object)
T
- The instance typebeanIdentifier
- The bean identifierbeanRegistration
- The bean registrationpublic void removeInFlightBean(BeanIdentifier beanIdentifier)
BeanResolutionContext
BeanContext.inject(Object)
beanIdentifier
- The bean identifier@Nullable public <T> BeanRegistration<T> getInFlightBean(BeanIdentifier beanIdentifier)
BeanResolutionContext
PostConstruct
method that also triggers bean resolution of the same bean.T
- The bean typebeanIdentifier
- The bean identifier