@Internal public abstract class AbstractBeanResolutionContext extends Object implements BeanResolutionContext
BeanResolutionContext
interface.Modifier and Type | Class and Description |
---|---|
static class |
AbstractBeanResolutionContext.AnnotationSegment
A segment that represents annotation.
|
static class |
AbstractBeanResolutionContext.ConstructorArgumentSegment
A segment that represents a method argument.
|
static class |
AbstractBeanResolutionContext.ConstructorSegment
A segment that represents a constructor.
|
static class |
AbstractBeanResolutionContext.FieldSegment
A segment that represents a field.
|
static class |
AbstractBeanResolutionContext.MethodArgumentSegment
A segment that represents a method argument.
|
static class |
AbstractBeanResolutionContext.MethodSegment
A segment that represents a method.
|
BeanResolutionContext.Path, BeanResolutionContext.Segment<T>
Modifier and Type | Field and Description |
---|---|
protected BeanContext |
context |
protected BeanDefinition |
rootDefinition |
Constructor and Description |
---|
AbstractBeanResolutionContext(BeanContext context,
BeanDefinition rootDefinition) |
Modifier and Type | Method and Description |
---|---|
<T> void |
addDependentBean(BeanIdentifier identifier,
BeanDefinition<T> definition,
T bean)
Adds a dependent bean to the resolution context.
|
void |
copyStateFrom(AbstractBeanResolutionContext context)
Copy the state from a previous resolution context.
|
void |
destroyInjectScopedBeans()
Call back to destroy any
InjectScope beans. |
<T> Optional<T> |
get(CharSequence name,
ArgumentConversionContext<T> conversionContext)
Resolve the given property for the given name.
|
<T> Optional<T> |
get(CharSequence name,
Class<T> requiredType)
Resolve the given property for the given name.
|
List<BeanRegistration<?>> |
getAndResetDependentBeans() |
Object |
getAttribute(CharSequence key) |
BeanContext |
getContext() |
Qualifier<?> |
getCurrentQualifier() |
BeanResolutionContext.Path |
getPath() |
BeanDefinition |
getRootDefinition() |
Object |
removeAttribute(CharSequence key)
Remove the attribute for the given key.
|
Object |
setAttribute(CharSequence key,
Object value)
Store a value within the context.
|
void |
setCurrentQualifier(Qualifier<?> qualifier)
Sets the current qualifier.
|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
addInFlightBean, close, copy, getInFlightBean, removeInFlightBean
get, get
protected final BeanContext context
protected final BeanDefinition rootDefinition
@Internal public AbstractBeanResolutionContext(BeanContext context, BeanDefinition rootDefinition)
context
- The bean contextrootDefinition
- The bean root definitionpublic void copyStateFrom(@NonNull AbstractBeanResolutionContext context)
context
- The previous contextpublic <T> void addDependentBean(BeanIdentifier identifier, BeanDefinition<T> definition, T bean)
BeanResolutionContext
addDependentBean
in interface BeanResolutionContext
T
- The generic typeidentifier
- The identifierdefinition
- The bean definitionbean
- The beanpublic void destroyInjectScopedBeans()
BeanResolutionContext
InjectScope
beans.destroyInjectScopedBeans
in interface BeanResolutionContext
InjectScope
@NonNull public List<BeanRegistration<?>> getAndResetDependentBeans()
getAndResetDependentBeans
in interface BeanResolutionContext
public final BeanContext getContext()
getContext
in interface BeanResolutionContext
public final BeanDefinition getRootDefinition()
getRootDefinition
in interface BeanResolutionContext
public final BeanResolutionContext.Path getPath()
getPath
in interface BeanResolutionContext
public final Object setAttribute(CharSequence key, Object value)
BeanResolutionContext
setAttribute
in interface BeanResolutionContext
key
- The keyvalue
- The valuepublic final Object getAttribute(CharSequence key)
getAttribute
in interface BeanResolutionContext
key
- The keypublic final Object removeAttribute(CharSequence key)
BeanResolutionContext
removeAttribute
in interface BeanResolutionContext
key
- the key@Nullable public Qualifier<?> getCurrentQualifier()
getCurrentQualifier
in interface BeanResolutionContext
public void setCurrentQualifier(@Nullable Qualifier<?> qualifier)
BeanResolutionContext
setCurrentQualifier
in interface BeanResolutionContext
qualifier
- The qualifierpublic <T> Optional<T> get(CharSequence name, ArgumentConversionContext<T> conversionContext)
ValueResolver
get
in interface ValueResolver<CharSequence>
T
- The concrete typename
- The nameconversionContext
- The conversion contextpublic <T> Optional<T> get(CharSequence name, Class<T> requiredType)
ValueResolver
get
in interface ValueResolver<CharSequence>
T
- The concrete typename
- The namerequiredType
- The required type