public class DefaultCustomScopeRegistry extends java.lang.Object implements CustomScopeRegistry
CustomScopeRegistry
interface.Modifier | Constructor and Description |
---|---|
protected |
DefaultCustomScopeRegistry(BeanLocator beanLocator) |
Modifier and Type | Method and Description |
---|---|
<T> java.util.Optional<BeanRegistration<T>> |
findBeanRegistration(T bean)
Finds A bean registration amongst the active scopes.
|
java.util.Optional<CustomScope<?>> |
findDeclaredScope(Argument<?> argument)
Finds the declared scope for the given argument.
|
java.util.Optional<CustomScope<?>> |
findDeclaredScope(BeanType<?> beanType)
Finds the declared scope for the given bean type.
|
java.util.Optional<CustomScope<?>> |
findScope(java.lang.Class<? extends java.lang.annotation.Annotation> scopeAnnotation)
Find a custom scope for the given annotation.
|
java.util.Optional<CustomScope<?>> |
findScope(java.lang.String scopeAnnotation)
Find a custom scope for the given annotation.
|
protected DefaultCustomScopeRegistry(BeanLocator beanLocator)
beanLocator
- The bean locatorpublic <T> java.util.Optional<BeanRegistration<T>> findBeanRegistration(T bean)
CustomScopeRegistry
findBeanRegistration
in interface CustomScopeRegistry
T
- The bean typebean
- The beanpublic java.util.Optional<CustomScope<?>> findDeclaredScope(@NonNull Argument<?> argument)
CustomScopeRegistry
findDeclaredScope
in interface CustomScopeRegistry
argument
- The argumentpublic java.util.Optional<CustomScope<?>> findDeclaredScope(@NonNull BeanType<?> beanType)
CustomScopeRegistry
findDeclaredScope
in interface CustomScopeRegistry
beanType
- The bean typepublic java.util.Optional<CustomScope<?>> findScope(java.lang.Class<? extends java.lang.annotation.Annotation> scopeAnnotation)
CustomScopeRegistry
findScope
in interface CustomScopeRegistry
scopeAnnotation
- The scope annotationpublic java.util.Optional<CustomScope<?>> findScope(java.lang.String scopeAnnotation)
CustomScopeRegistry
findScope
in interface CustomScopeRegistry
scopeAnnotation
- The scope annotation