@Internal public final class DefaultBeanResolutionContext extends Object implements BeanResolutionContext
BeanResolutionContext
interface.BeanResolutionContext.Path, BeanResolutionContext.Segment
Constructor and Description |
---|
DefaultBeanResolutionContext(BeanContext context,
BeanDefinition rootDefinition) |
Modifier and Type | Method and Description |
---|---|
<T> void |
addInFlightBean(BeanIdentifier beanIdentifier,
T instance)
Adds a bean that is created as part of the resolution.
|
<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.
|
Object |
getAttribute(CharSequence key) |
BeanContext |
getContext() |
<T> T |
getInFlightBean(BeanIdentifier beanIdentifier)
Obtains an inflight bean for the given identifier.
|
BeanResolutionContext.Path |
getPath() |
BeanDefinition |
getRootDefinition() |
void |
removeAttribute(CharSequence key)
Remove the attribute for the given key.
|
Object |
setAttribute(CharSequence key,
Object value)
Store a value within the context.
|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
get, get
@Internal public DefaultBeanResolutionContext(BeanContext context, BeanDefinition rootDefinition)
context
- The bean contextrootDefinition
- The bean root definitionpublic BeanContext getContext()
getContext
in interface BeanResolutionContext
public BeanDefinition getRootDefinition()
getRootDefinition
in interface BeanResolutionContext
public BeanResolutionContext.Path getPath()
getPath
in interface BeanResolutionContext
public Object setAttribute(CharSequence key, Object value)
BeanResolutionContext
setAttribute
in interface BeanResolutionContext
key
- The keyvalue
- The valuepublic Object getAttribute(CharSequence key)
getAttribute
in interface BeanResolutionContext
key
- The keypublic void removeAttribute(CharSequence key)
BeanResolutionContext
removeAttribute
in interface BeanResolutionContext
key
- the keypublic <T> void addInFlightBean(BeanIdentifier beanIdentifier, T instance)
BeanResolutionContext
BeanContext.inject(Object)
addInFlightBean
in interface BeanResolutionContext
T
- THe instance typebeanIdentifier
- The bean identifierinstance
- The instance@Nullable public <T> T getInFlightBean(BeanIdentifier beanIdentifier)
BeanResolutionContext
getInFlightBean
in interface BeanResolutionContext
T
- The bean typebeanIdentifier
- The bean identifierpublic <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