Class DefaultCustomScopeRegistry

    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      <T> java.util.Optional<BeanRegistration<T>> findBeanRegistration​(T bean)
      Finds A bean registration amongst the active scopes.
      java.util.Optional<CustomScope<?>> findDeclaredScope​(io.micronaut.core.type.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.
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Constructor Detail

      • DefaultCustomScopeRegistry

        protected DefaultCustomScopeRegistry​(BeanLocator beanLocator)
        Parameters:
        beanLocator - The bean locator
    • Method Detail

      • findBeanRegistration

        public <T> java.util.Optional<BeanRegistration<T>> findBeanRegistration​(T bean)
        Description copied from interface: CustomScopeRegistry
        Finds A bean registration amongst the active scopes.
        Specified by:
        findBeanRegistration in interface CustomScopeRegistry
        Type Parameters:
        T - The bean type
        Parameters:
        bean - The bean
        Returns:
        An optional bean registration
      • findDeclaredScope

        public java.util.Optional<CustomScope<?>> findDeclaredScope​(@NonNull
                                                                    io.micronaut.core.type.Argument<?> argument)
        Description copied from interface: CustomScopeRegistry
        Finds the declared scope for the given argument.
        Specified by:
        findDeclaredScope in interface CustomScopeRegistry
        Parameters:
        argument - The argument
        Returns:
        An optional scope
      • findScope

        public java.util.Optional<CustomScope<?>> findScope​(java.lang.Class<? extends java.lang.annotation.Annotation> scopeAnnotation)
        Description copied from interface: CustomScopeRegistry
        Find a custom scope for the given annotation.
        Specified by:
        findScope in interface CustomScopeRegistry
        Parameters:
        scopeAnnotation - The scope annotation
        Returns:
        The custom scope
      • findScope

        public java.util.Optional<CustomScope<?>> findScope​(java.lang.String scopeAnnotation)
        Description copied from interface: CustomScopeRegistry
        Find a custom scope for the given annotation.
        Specified by:
        findScope in interface CustomScopeRegistry
        Parameters:
        scopeAnnotation - The scope annotation
        Returns:
        The custom scope