Package io.micronaut.inject
Interface BeanType<T>
- Type Parameters:
- T- The bean type
- All Superinterfaces:
- AnnotationMetadataProvider,- AnnotationSource,- ArgumentCoercible<T>,- BeanContextConditional,- BeanInfo<T>,- Ordered
- All Known Subinterfaces:
- AdvisedBeanType<T>,- BeanDefinition<T>,- BeanDefinitionReference<T>,- DelegatingBeanDefinition<T>,- DisposableBeanDefinition<T>,- InitializingBeanDefinition<T>,- InjectableBeanDefinition<T>,- InstantiatableBeanDefinition<T>,- ParametrizedInstantiatableBeanDefinition<T>,- ProxyBeanDefinition<T>,- QualifiedBeanType<T>,- RuntimeBeanDefinition<T>,- ValidatedBeanDefinition<T>
- All Known Implementing Classes:
- AbstractInitializableBeanDefinition,- AbstractInitializableBeanDefinitionAndReference,- AbstractInitializableBeanDefinitionReference,- AbstractProviderDefinition,- ApplicationEventPublisherFactory,- ArgumentBeanType,- BeanProviderDefinition,- BeanRegistration,- DisabledBean,- InterceptorRegistryBean,- JakartaProviderBeanDefinition,- JavaxProviderBeanDefinition
public interface BeanType<T>
extends AnnotationMetadataProvider, BeanContextConditional, BeanInfo<T>
A reference to a bean. Implemented by bother 
BeanDefinitionReference and BeanDefinition.- Since:
- 1.0
- Author:
- Graeme Rocher
- 
Field SummaryFields inherited from interface io.micronaut.core.annotation.AnnotationSourceEMPTYFields inherited from interface io.micronaut.core.order.OrderedHIGHEST_PRECEDENCE, LOWEST_PRECEDENCE
- 
Method SummaryModifier and TypeMethodDescriptionReturns the name of the bean usually resolved via theNamedannotation.Returns the bean type.Returns a potentially limited subset of bean types exposed by this bean.default StringgetName()default booleanisCandidateBean(@Nullable Argument<?> beanType) Return whether this bean type is a candidate for dependency injection for the passed type.default booleanChecks whether the bean type is a container type.default booleandefault booleanBy default, when theBeanContextis started, theBeanDefinition.getExecutableMethods()are not processed by registeredExecutableMethodProcessorinstances unless this method returns true.Methods inherited from interface io.micronaut.core.annotation.AnnotationMetadataProviderfindAnnotation, findAnnotation, findDeclaredAnnotation, findDeclaredAnnotation, getAnnotationMetadata, getTargetAnnotationMetadata, isAnnotationPresent, isDeclaredAnnotationPresent, synthesize, synthesizeAll, synthesizeAnnotationsByType, synthesizeDeclared, synthesizeDeclared, synthesizeDeclaredAnnotationsByTypeMethods inherited from interface io.micronaut.core.annotation.AnnotationSourcegetAnnotation, getAnnotation, getDeclaredAnnotation, getDeclaredAnnotation, isAnnotationPresent, isDeclaredAnnotationPresent, synthesize, synthesizeDeclaredMethods inherited from interface io.micronaut.inject.BeanContextConditionalisEnabled, isEnabledMethods inherited from interface io.micronaut.core.beans.BeanInfoasArgument, getGenericBeanType, getOrder
- 
Method Details- 
isPrimarydefault boolean isPrimary()- Returns:
- Whether the bean definition is the Primary
 
- 
getBeanTypeReturns the bean type.- Specified by:
- getBeanTypein interface- BeanInfo<T>
- Returns:
- The underlying bean type
 
- 
getBeanNameReturns the name of the bean usually resolved via theNamedannotation.- Returns:
- The name of the bean if any
- Since:
- 4.0.0
 
- 
isContainerTypedefault boolean isContainerType()Checks whether the bean type is a container type.- Returns:
- Whether the type is a container type like Iterable.
- Since:
- 3.0.0
 
- 
getExposedTypesReturns a potentially limited subset of bean types exposed by this bean. The types to be exposed can be defined by theTypeannotation.- Returns:
- The exposed types
- Since:
- 3.0.0
 
- 
isCandidateBeanReturn whether this bean type is a candidate for dependency injection for the passed type.- Parameters:
- beanType- The bean type
- Returns:
- True if it is
- Since:
- 3.0.0
 
- 
getName- Returns:
- The class name
 
- 
requiresMethodProcessingdefault boolean requiresMethodProcessing()By default, when theBeanContextis started, theBeanDefinition.getExecutableMethods()are not processed by registeredExecutableMethodProcessorinstances unless this method returns true.- Returns:
- Whether the bean definition requires method processing
- See Also:
 
 
-