Interface BeanType<T>

Type Parameters:
T - The bean type
All Superinterfaces:
AnnotationMetadataProvider, AnnotationSource, ArgumentCoercible<T>, BeanContextConditional, BeanInfo<T>
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, 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
  • Method Details

    • isPrimary

      default boolean isPrimary()
      Returns:
      Whether the bean definition is the Primary
    • getBeanType

      @NonNull @NonNull Class<T> getBeanType()
      Returns the bean type.
      Specified by:
      getBeanType in interface BeanInfo<T>
      Returns:
      The underlying bean type
    • getBeanName

      default Optional<String> getBeanName()
      Returns the name of the bean usually resolved via the Named annotation.
      Returns:
      The name of the bean if any
      Since:
      4.0.0
    • isContainerType

      default 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
    • getExposedTypes

      @NonNull default @NonNull Set<Class<?>> getExposedTypes()
      Returns a potentially limited subset of bean types exposed by this bean. The types to be exposed can be defined by the Type annotation.
      Returns:
      The exposed types
      Since:
      3.0.0
    • isCandidateBean

      default boolean isCandidateBean(@Nullable @Nullable Argument<?> beanType)
      Return 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

      default String getName()
      Returns:
      The class name
    • requiresMethodProcessing

      default boolean requiresMethodProcessing()
      By default, when the BeanContext is started, the BeanDefinition.getExecutableMethods() are not processed by registered ExecutableMethodProcessor instances unless this method returns true.
      Returns:
      Whether the bean definition requires method processing
      See Also: