Class AbstractBeanConfiguration

  • All Implemented Interfaces:
    io.micronaut.core.annotation.AnnotationMetadataProvider, io.micronaut.core.annotation.AnnotationSource, BeanConfiguration, BeanContextConditional

    @Internal
    public abstract class AbstractBeanConfiguration
    extends java.lang.Object
    implements BeanConfiguration
    An abstract implementation of the BeanConfiguration method. Not typically used directly from user code, instead an implementation will perform analysis on package-info files generate a configuration definition for a given package.
    Since:
    1.0
    • Field Summary

      • Fields inherited from interface io.micronaut.core.annotation.AnnotationSource

        EMPTY
    • Constructor Summary

      Constructors 
      Modifier Constructor Description
      protected AbstractBeanConfiguration​(java.lang.String thePackage)  
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      java.lang.String getName()  
      java.lang.Package getPackage()  
      java.lang.String getVersion()
      The version of this configuration.
      boolean isEnabled​(BeanContext context, BeanResolutionContext resolutionContext)
      Return whether this component is enabled for the given context.
      boolean isWithin​(BeanDefinitionReference beanDefinitionReference)
      Check whether the specified bean definition class is within this bean configuration.
      boolean isWithin​(java.lang.String className)
      Check whether the specified class is within this bean configuration.
      java.lang.String toString()  
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
      • Methods inherited from interface io.micronaut.core.annotation.AnnotationMetadataProvider

        findAnnotation, findAnnotation, findDeclaredAnnotation, findDeclaredAnnotation, getAnnotationMetadata, isAnnotationPresent, isDeclaredAnnotationPresent, synthesize, synthesizeAll, synthesizeAnnotationsByType, synthesizeDeclared, synthesizeDeclared, synthesizeDeclaredAnnotationsByType
      • Methods inherited from interface io.micronaut.core.annotation.AnnotationSource

        getAnnotation, getAnnotation, getDeclaredAnnotation, getDeclaredAnnotation, isAnnotationPresent, isDeclaredAnnotationPresent, synthesize, synthesizeDeclared
    • Constructor Detail

      • AbstractBeanConfiguration

        protected AbstractBeanConfiguration​(java.lang.String thePackage)
        Parameters:
        thePackage - The package name
    • Method Detail

      • getPackage

        public java.lang.Package getPackage()
        Specified by:
        getPackage in interface BeanConfiguration
        Returns:
        The package for the bean configuration
      • getName

        public java.lang.String getName()
        Specified by:
        getName in interface BeanConfiguration
        Returns:
        The package name this configuration
      • getVersion

        public java.lang.String getVersion()
        Description copied from interface: BeanConfiguration
        The version of this configuration. Note: returns null when called on a configuration not provided by a JAR.
        Specified by:
        getVersion in interface BeanConfiguration
        Returns:
        The version or null
      • isWithin

        public boolean isWithin​(BeanDefinitionReference beanDefinitionReference)
        Description copied from interface: BeanConfiguration
        Check whether the specified bean definition class is within this bean configuration.
        Specified by:
        isWithin in interface BeanConfiguration
        Parameters:
        beanDefinitionReference - The bean definition class
        Returns:
        True if it is
      • toString

        public java.lang.String toString()
        Overrides:
        toString in class java.lang.Object
      • isWithin

        public boolean isWithin​(java.lang.String className)
        Description copied from interface: BeanConfiguration
        Check whether the specified class is within this bean configuration.
        Specified by:
        isWithin in interface BeanConfiguration
        Parameters:
        className - The class name
        Returns:
        True if it is