A - An annotation typepublic interface CustomScope<A extends Annotation>
BeanContext.Scope| Modifier and Type | Method and Description | 
|---|---|
| Class<A> | annotationType() | 
| default <T> Optional<BeanRegistration<T>> | findBeanRegistration(T bean)Get the  BeanDefinitionfor the given bean. | 
| <T> T | get(BeanResolutionContext resolutionContext,
   BeanDefinition<T> beanDefinition,
   BeanIdentifier identifier,
   Provider<T> provider)Resolve an object from the given scope. | 
| <T> Optional<T> | remove(BeanIdentifier identifier)Remove a bean definition from the scope. | 
<T> T get(BeanResolutionContext resolutionContext, BeanDefinition<T> beanDefinition, BeanIdentifier identifier, Provider<T> provider)
T - The bean generic typeresolutionContext - The bean resolution contextbeanDefinition - The bean definitionidentifier - The BeanIdentifierprovider - The provider that will build the bean definition<T> Optional<T> remove(BeanIdentifier identifier)
T - The generic typeidentifier - The BeanIdentifierOptional of the instance if it existsdefault <T> Optional<BeanRegistration<T>> findBeanRegistration(T bean)
BeanDefinition for the given bean.T - The bean generic typebean - The bean