Class AbstractInitializableBeanDefinitionReference<T>

  • Type Parameters:
    T - The bean type
    All Implemented Interfaces:
    io.micronaut.core.annotation.AnnotationMetadataProvider, io.micronaut.core.annotation.AnnotationSource, BeanContextConditional, BeanDefinitionReference<T>, BeanType<T>

    @Internal
    public abstract class AbstractInitializableBeanDefinitionReference<T>
    extends java.lang.Object
    implements BeanDefinitionReference<T>
    An uninitialized and unloaded component definition with basic information available regarding its requirements.
    Since:
    3.0
    • Field Summary

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

        EMPTY
    • Constructor Summary

      Constructors 
      Constructor Description
      AbstractInitializableBeanDefinitionReference​(java.lang.String beanTypeName, java.lang.String beanDefinitionTypeName, io.micronaut.core.annotation.AnnotationMetadata annotationMetadata, boolean isPrimary, boolean isContextScope, boolean isConditional, boolean isContainerType, boolean isSingleton, boolean isConfigurationProperties, boolean hasExposedTypes, boolean requiresMethodProcessing)  
    • Constructor Detail

      • AbstractInitializableBeanDefinitionReference

        public AbstractInitializableBeanDefinitionReference​(java.lang.String beanTypeName,
                                                            java.lang.String beanDefinitionTypeName,
                                                            io.micronaut.core.annotation.AnnotationMetadata annotationMetadata,
                                                            boolean isPrimary,
                                                            boolean isContextScope,
                                                            boolean isConditional,
                                                            boolean isContainerType,
                                                            boolean isSingleton,
                                                            boolean isConfigurationProperties,
                                                            boolean hasExposedTypes,
                                                            boolean requiresMethodProcessing)
        Parameters:
        beanTypeName - The bean type name
        beanDefinitionTypeName - The bean definition type name
        annotationMetadata - The annotationMetadata
        isPrimary - Is primary bean?
        isContextScope - Is context scope?
        isConditional - Is conditional? = No @Requires
        isContainerType - Is container type?
        isSingleton - Is singleton?
        isConfigurationProperties - Is configuration properties?
        hasExposedTypes - Has exposed types?
        requiresMethodProcessing - Is requires method processing?
    • Method Detail

      • getName

        public java.lang.String getName()
        Specified by:
        getName in interface BeanType<T>
        Returns:
        The class name
      • getAnnotationMetadata

        public io.micronaut.core.annotation.AnnotationMetadata getAnnotationMetadata()
        Specified by:
        getAnnotationMetadata in interface io.micronaut.core.annotation.AnnotationMetadataProvider
      • isPrimary

        public boolean isPrimary()
        Specified by:
        isPrimary in interface BeanType<T>
        Returns:
        Whether the bean definition is the Primary
      • isContainerType

        public boolean isContainerType()
        Description copied from interface: BeanType
        Checks whether the bean type is a container type.
        Specified by:
        isContainerType in interface BeanType<T>
        Returns:
        Whether the type is a container type like Iterable.
      • getExposedTypes

        @NonNull
        public final java.util.Set<java.lang.Class<?>> getExposedTypes()
        Description copied from interface: BeanType
        Returns a potentially limited subset of bean types exposed by this bean. The types to be exposed can be defined by the Type annotation.
        Specified by:
        getExposedTypes in interface BeanType<T>
        Returns:
        The exposed types
      • isPresent

        public boolean isPresent()
        Specified by:
        isPresent in interface BeanDefinitionReference<T>
        Returns:
        Is the underlying bean type present on the classpath
      • equals

        public boolean equals​(java.lang.Object o)
        Overrides:
        equals in class java.lang.Object
      • toString

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

        public int hashCode()
        Overrides:
        hashCode in class java.lang.Object
      • getBeanDefinitionType

        protected abstract java.lang.Class<? extends BeanDefinition<?>> getBeanDefinitionType()
        Implementors should provide an implementation of this method that returns the bean definition type.
        Returns:
        The bean definition type.