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