org.springframework.context.annotation
Interface FeatureAnnotationParser


public interface FeatureAnnotationParser

Interface for parsing AnnotationMetadata from a FeatureAnnotation into a FeatureSpecification object. Used in conjunction with a FeatureSpecificationExecutor to provide a source-agnostic approach to handling configuration metadata.

For example, Spring's component-scanning can be configured via XML using the context:component-scan element or via the ComponentScan annotation. In either case, the metadata is the same -- only the source format differs. ComponentScanBeanDefinitionParser is used to create a specification from the <context:component-scan> XML element, while ComponentScanAnnotationParser creates a specification from the the annotation style. They both produce a ComponentScanSpec object that is ultimately delegated to a ComponentScanExecutor which understands how to configure a ClassPathBeanDefinitionScanner, perform actual scanning, and register actual bean definitions against the container.

Implementations must be instantiable via a no-arg constructor. TODO SPR-7420: documentation (clean up) TODO SPR-7420: rework so annotations declare their creator.

Since:
3.1
Author:
Chris Beams
See Also:
FeatureAnnotation.parser(), FeatureSpecification, FeatureSpecificationExecutor

Method Summary
 FeatureSpecification process(AnnotationMetadata metadata)
          Parse the given annotation metadata and populate a FeatureSpecification object suitable for execution by a FeatureSpecificationExecutor.
 

Method Detail

process

FeatureSpecification process(AnnotationMetadata metadata)
Parse the given annotation metadata and populate a FeatureSpecification object suitable for execution by a FeatureSpecificationExecutor.