Spring Framework

org.springframework.context.annotation
Class AnnotationConfigUtils

java.lang.Object
  extended by org.springframework.context.annotation.AnnotationConfigUtils

public class AnnotationConfigUtils
extends java.lang.Object

Utility class that allows for convenient registration of common BeanPostProcessor and BeanFactoryPostProcessor definitions for annotation-based configuration.

Since:
2.5
Author:
Mark Fisher, Juergen Hoeller, Chris Beams
See Also:
CommonAnnotationBeanPostProcessor, ConfigurationClassPostProcessor, AutowiredAnnotationBeanPostProcessor, RequiredAnnotationBeanPostProcessor, PersistenceAnnotationBeanPostProcessor

Field Summary
static java.lang.String ASYNC_ANNOTATION_PROCESSOR_BEAN_NAME
          The bean name of the internally managed Async annotation processor.
static java.lang.String ASYNC_EXECUTION_ASPECT_BEAN_NAME
          The bean name of the internally managed AspectJ async execution aspect.
static java.lang.String ASYNC_EXECUTION_ASPECT_CLASS_NAME
          The class name of the AspectJ async execution aspect.
static java.lang.String ASYNC_EXECUTION_ASPECT_CONFIGURATION_CLASS_NAME
          The name of the AspectJ async execution aspect @Configuration class.
static java.lang.String AUTOWIRED_ANNOTATION_PROCESSOR_BEAN_NAME
          The bean name of the internally managed Autowired annotation processor.
static java.lang.String CACHE_ADVISOR_BEAN_NAME
          The bean name of the internally managed cache advisor.
static java.lang.String CACHE_ASPECT_BEAN_NAME
          The bean name of the internally managed cache aspect.
static java.lang.String CACHE_ASPECT_CLASS_NAME
          The class name of the AspectJ caching aspect.
static java.lang.String CACHE_ASPECT_CONFIGURATION_CLASS_NAME
          The name of the AspectJ caching aspect @Configuration class.
static java.lang.String COMMON_ANNOTATION_PROCESSOR_BEAN_NAME
          The bean name of the internally managed JSR-250 annotation processor.
static java.lang.String CONFIGURATION_ANNOTATION_PROCESSOR_BEAN_NAME
          The bean name of the internally managed Configuration annotation processor.
static java.lang.String CONFIGURATION_BEAN_NAME_GENERATOR
          The bean name of the internally managed BeanNameGenerator for use when processing Configuration classes.
static java.lang.String PERSISTENCE_ANNOTATION_PROCESSOR_BEAN_NAME
          The bean name of the internally managed JPA annotation processor.
static java.lang.String REQUIRED_ANNOTATION_PROCESSOR_BEAN_NAME
          The bean name of the internally managed Required annotation processor.
static java.lang.String SCHEDULED_ANNOTATION_PROCESSOR_BEAN_NAME
          The bean name of the internally managed Scheduled annotation processor.
 
Constructor Summary
AnnotationConfigUtils()
           
 
Method Summary
static void registerAnnotationConfigProcessors(BeanDefinitionRegistry registry)
          Register all relevant annotation post processors in the given registry.
static java.util.Set<BeanDefinitionHolder> registerAnnotationConfigProcessors(BeanDefinitionRegistry registry, java.lang.Object source)
          Register all relevant annotation post processors in the given registry.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

CONFIGURATION_ANNOTATION_PROCESSOR_BEAN_NAME

public static final java.lang.String CONFIGURATION_ANNOTATION_PROCESSOR_BEAN_NAME
The bean name of the internally managed Configuration annotation processor.

See Also:
Constant Field Values

CONFIGURATION_BEAN_NAME_GENERATOR

public static final java.lang.String CONFIGURATION_BEAN_NAME_GENERATOR
The bean name of the internally managed BeanNameGenerator for use when processing Configuration classes. Set by AnnotationConfigApplicationContext and AnnotationConfigWebApplicationContext during bootstrap in order to make any custom name generation strategy available to the underlying ConfigurationClassPostProcessor.

Since:
3.1.1
See Also:
Constant Field Values

AUTOWIRED_ANNOTATION_PROCESSOR_BEAN_NAME

public static final java.lang.String AUTOWIRED_ANNOTATION_PROCESSOR_BEAN_NAME
The bean name of the internally managed Autowired annotation processor.

See Also:
Constant Field Values

REQUIRED_ANNOTATION_PROCESSOR_BEAN_NAME

public static final java.lang.String REQUIRED_ANNOTATION_PROCESSOR_BEAN_NAME
The bean name of the internally managed Required annotation processor.

See Also:
Constant Field Values

COMMON_ANNOTATION_PROCESSOR_BEAN_NAME

public static final java.lang.String COMMON_ANNOTATION_PROCESSOR_BEAN_NAME
The bean name of the internally managed JSR-250 annotation processor.

See Also:
Constant Field Values

SCHEDULED_ANNOTATION_PROCESSOR_BEAN_NAME

public static final java.lang.String SCHEDULED_ANNOTATION_PROCESSOR_BEAN_NAME
The bean name of the internally managed Scheduled annotation processor.

See Also:
Constant Field Values

ASYNC_ANNOTATION_PROCESSOR_BEAN_NAME

public static final java.lang.String ASYNC_ANNOTATION_PROCESSOR_BEAN_NAME
The bean name of the internally managed Async annotation processor.

See Also:
Constant Field Values

ASYNC_EXECUTION_ASPECT_BEAN_NAME

public static final java.lang.String ASYNC_EXECUTION_ASPECT_BEAN_NAME
The bean name of the internally managed AspectJ async execution aspect.

See Also:
Constant Field Values

ASYNC_EXECUTION_ASPECT_CLASS_NAME

public static final java.lang.String ASYNC_EXECUTION_ASPECT_CLASS_NAME
The class name of the AspectJ async execution aspect.

See Also:
Constant Field Values

ASYNC_EXECUTION_ASPECT_CONFIGURATION_CLASS_NAME

public static final java.lang.String ASYNC_EXECUTION_ASPECT_CONFIGURATION_CLASS_NAME
The name of the AspectJ async execution aspect @Configuration class.

See Also:
Constant Field Values

CACHE_ADVISOR_BEAN_NAME

public static final java.lang.String CACHE_ADVISOR_BEAN_NAME
The bean name of the internally managed cache advisor.

See Also:
Constant Field Values

CACHE_ASPECT_BEAN_NAME

public static final java.lang.String CACHE_ASPECT_BEAN_NAME
The bean name of the internally managed cache aspect.

See Also:
Constant Field Values

CACHE_ASPECT_CLASS_NAME

public static final java.lang.String CACHE_ASPECT_CLASS_NAME
The class name of the AspectJ caching aspect.

See Also:
Constant Field Values

CACHE_ASPECT_CONFIGURATION_CLASS_NAME

public static final java.lang.String CACHE_ASPECT_CONFIGURATION_CLASS_NAME
The name of the AspectJ caching aspect @Configuration class.

See Also:
Constant Field Values

PERSISTENCE_ANNOTATION_PROCESSOR_BEAN_NAME

public static final java.lang.String PERSISTENCE_ANNOTATION_PROCESSOR_BEAN_NAME
The bean name of the internally managed JPA annotation processor.

See Also:
Constant Field Values
Constructor Detail

AnnotationConfigUtils

public AnnotationConfigUtils()
Method Detail

registerAnnotationConfigProcessors

public static void registerAnnotationConfigProcessors(BeanDefinitionRegistry registry)
Register all relevant annotation post processors in the given registry.

Parameters:
registry - the registry to operate on

registerAnnotationConfigProcessors

public static java.util.Set<BeanDefinitionHolder> registerAnnotationConfigProcessors(BeanDefinitionRegistry registry,
                                                                                     java.lang.Object source)
Register all relevant annotation post processors in the given registry.

Parameters:
registry - the registry to operate on
source - the configuration source element (already extracted) that this registration was triggered from. May be null.
Returns:
a Set of BeanDefinitionHolders, containing all bean definitions that have actually been registered by this call

Spring Framework