A
- An annotation type@Indexed(value=CustomScope.class) public interface CustomScope<A extends Annotation>
BeanContext
.Scope
Modifier and Type | Method and Description |
---|---|
Class<A> |
annotationType() |
default <T> Optional<BeanRegistration<T>> |
findBeanRegistration(BeanDefinition<T> beanDefinition)
Get the
BeanDefinition for the given bean. |
default <T> Optional<BeanRegistration<T>> |
findBeanRegistration(T bean)
Get the
BeanDefinition for the given bean. |
<T> T |
getOrCreate(BeanCreationContext<T> creationContext)
Resolve an object from the given scope.
|
<T> Optional<T> |
remove(BeanIdentifier identifier)
Remove a bean definition from the scope.
|
<T> T getOrCreate(BeanCreationContext<T> creationContext)
T
- The bean generic typecreationContext
- The creation context<T> Optional<T> remove(BeanIdentifier identifier)
T
- The generic typeidentifier
- The BeanIdentifier
Optional
of the instance that was destroyed if it existsdefault <T> Optional<BeanRegistration<T>> findBeanRegistration(T bean)
BeanDefinition
for the given bean.T
- The bean generic typebean
- The beandefault <T> Optional<BeanRegistration<T>> findBeanRegistration(BeanDefinition<T> beanDefinition)
BeanDefinition
for the given bean.T
- The bean generic typebeanDefinition
- The bean definition