Class AbstractBeanDefinitionReference

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

    @Internal
    public abstract class AbstractBeanDefinitionReference
    extends java.lang.Object
    implements BeanDefinitionReference
    An uninitialized and unloaded component definition with basic information available regarding its requirements.
    Since:
    1.0
    • Constructor Detail

      • AbstractBeanDefinitionReference

        public AbstractBeanDefinitionReference​(java.lang.String beanTypeName,
                                               java.lang.String beanDefinitionTypeName)
        Parameters:
        beanTypeName - The bean type name
        beanDefinitionTypeName - The bean definition type name
    • Method Detail

      • isPrimary

        public boolean isPrimary()
        Specified by:
        isPrimary in interface BeanType
        Returns:
        Whether the bean definition is the Primary
      • 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
        Returns:
        The exposed types
      • getName

        public java.lang.String getName()
        Specified by:
        getName in interface BeanType
        Returns:
        The class name
      • isPresent

        public boolean isPresent()
        Specified by:
        isPresent in interface BeanDefinitionReference
        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.