Class AbstractImportingAnnotationConfiguration<B extends AnnotationBuilder<O>,O>

java.lang.Object
org.springframework.statemachine.config.common.annotation.AbstractImportingAnnotationConfiguration<B,O>
Type Parameters:
O - The object that used builder returns
B - The type of the builder
All Implemented Interfaces:
org.springframework.beans.factory.Aware, org.springframework.beans.factory.BeanFactoryAware, org.springframework.context.annotation.ImportBeanDefinitionRegistrar, org.springframework.context.EnvironmentAware
Direct Known Subclasses:
StateMachineConfiguration, StateMachineFactoryConfiguration

public abstract class AbstractImportingAnnotationConfiguration<B extends AnnotationBuilder<O>,O> extends Object implements org.springframework.context.annotation.ImportBeanDefinitionRegistrar, org.springframework.beans.factory.BeanFactoryAware, org.springframework.context.EnvironmentAware
Base class for Configuration which works on a bean definition level relying on ImportBeanDefinitionRegistrar phase to register beans.
  • Constructor Details

    • AbstractImportingAnnotationConfiguration

      public AbstractImportingAnnotationConfiguration()
  • Method Details

    • registerBeanDefinitions

      public void registerBeanDefinitions(org.springframework.core.type.AnnotationMetadata importingClassMetadata, org.springframework.beans.factory.support.BeanDefinitionRegistry registry)
      Specified by:
      registerBeanDefinitions in interface org.springframework.context.annotation.ImportBeanDefinitionRegistrar
    • setBeanFactory

      public void setBeanFactory(org.springframework.beans.factory.BeanFactory beanFactory) throws org.springframework.beans.BeansException
      Specified by:
      setBeanFactory in interface org.springframework.beans.factory.BeanFactoryAware
      Throws:
      org.springframework.beans.BeansException
    • setEnvironment

      public void setEnvironment(org.springframework.core.env.Environment environment)
      Specified by:
      setEnvironment in interface org.springframework.context.EnvironmentAware
    • buildBeanDefinition

      protected abstract org.springframework.beans.factory.config.BeanDefinition buildBeanDefinition(org.springframework.core.type.AnnotationMetadata importingClassMetadata, Class<? extends Annotation> namedAnnotation) throws Exception
      Called to get a bean definition to register.
      Parameters:
      importingClassMetadata - annotation metadata of the importing class
      namedAnnotation - found annotations for bean names
      Returns:
      the bean definition to register
      Throws:
      Exception - if error occurred
    • getAnnotations

      protected abstract List<Class<? extends Annotation>> getAnnotations()
      Gets the annotations specific for this configurer.
      Returns:
      the annotations
    • getBeanFactory

      protected org.springframework.beans.factory.BeanFactory getBeanFactory()
      Gets the bean factory.
      Returns:
      the bean factory
    • getEnvironment

      protected org.springframework.core.env.Environment getEnvironment()
      Gets the environment.
      Returns:
      the environment