Package io.micronaut.context
Class DefaultCustomScopeRegistry
java.lang.Object
io.micronaut.context.DefaultCustomScopeRegistry
- All Implemented Interfaces:
CustomScopeRegistry
Default implementation of the
CustomScopeRegistry
interface.- Since:
- 1.0
- Author:
- Graeme Rocher
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescription<T> Optional<BeanRegistration<T>>
findBeanRegistration
(T bean) Finds A bean registration amongst the active scopes.Optional<CustomScope<?>>
findDeclaredScope
(@NonNull Argument<?> argument) Finds the declared scope for the given argument.Optional<CustomScope<?>>
findDeclaredScope
(@NonNull BeanType<?> beanType) Finds the declared scope for the given bean type.Optional<CustomScope<?>>
findScope
(Class<? extends Annotation> scopeAnnotation) Find a custom scope for the given annotation.Optional<CustomScope<?>>
Find a custom scope for the given annotation.
-
Constructor Details
-
DefaultCustomScopeRegistry
- Parameters:
beanLocator
- The bean locator
-
-
Method Details
-
findBeanRegistration
Description copied from interface:CustomScopeRegistry
Finds A bean registration amongst the active scopes.- Specified by:
findBeanRegistration
in interfaceCustomScopeRegistry
- Type Parameters:
T
- The bean type- Parameters:
bean
- The bean- Returns:
- An optional bean registration
-
findDeclaredScope
Description copied from interface:CustomScopeRegistry
Finds the declared scope for the given argument.- Specified by:
findDeclaredScope
in interfaceCustomScopeRegistry
- Parameters:
argument
- The argument- Returns:
- An optional scope
-
findDeclaredScope
Description copied from interface:CustomScopeRegistry
Finds the declared scope for the given bean type.- Specified by:
findDeclaredScope
in interfaceCustomScopeRegistry
- Parameters:
beanType
- The bean type- Returns:
- An optional scope
-
findScope
Description copied from interface:CustomScopeRegistry
Find a custom scope for the given annotation.- Specified by:
findScope
in interfaceCustomScopeRegistry
- Parameters:
scopeAnnotation
- The scope annotation- Returns:
- The custom scope
-
findScope
Description copied from interface:CustomScopeRegistry
Find a custom scope for the given annotation.- Specified by:
findScope
in interfaceCustomScopeRegistry
- Parameters:
scopeAnnotation
- The scope annotation- Returns:
- The custom scope
-