org.springframework.context.config
Class AbstractFeatureSpecification

java.lang.Object
  extended by org.springframework.context.config.AbstractFeatureSpecification
All Implemented Interfaces:
FeatureSpecification, SourceAwareSpecification
Direct Known Subclasses:
ComponentScanSpec, MvcAnnotationDriven, MvcDefaultServletHandler, MvcResources, MvcViewControllers, TxAnnotationDriven

public abstract class AbstractFeatureSpecification
extends Object
implements SourceAwareSpecification

TODO SPR-7420: document

Since:
3.1
Author:
Chris Beams

Field Summary
protected  Class<? extends FeatureSpecificationExecutor> executorType
           
 
Constructor Summary
protected AbstractFeatureSpecification(Class<? extends FeatureSpecificationExecutor> executorType)
           
 
Method Summary
protected abstract  void doValidate(ProblemCollector problems)
           
 void execute(SpecificationContext specificationContext)
          Execute this specification instance, carrying out the instructions specified within.
 Object source()
           
 AbstractFeatureSpecification source(Object source)
           
 String sourceName()
           
 AbstractFeatureSpecification sourceName(String sourceName)
           
 boolean validate(ProblemReporter problemReporter)
          Validate this specification instance to ensure all required properties have been set, including checks on mutually exclusive or mutually dependent properties.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

executorType

protected Class<? extends FeatureSpecificationExecutor> executorType
Constructor Detail

AbstractFeatureSpecification

protected AbstractFeatureSpecification(Class<? extends FeatureSpecificationExecutor> executorType)
Method Detail

validate

public final boolean validate(ProblemReporter problemReporter)
Description copied from interface: FeatureSpecification
Validate this specification instance to ensure all required properties have been set, including checks on mutually exclusive or mutually dependent properties. May in some cases modify the state of the specification e.g., instantiating types specified as strings.

Specified by:
validate in interface FeatureSpecification
Returns:
whether any problems occurred during validation
See Also:
AbstractSpecificationExecutor#execute(Specification)

doValidate

protected abstract void doValidate(ProblemCollector problems)

source

public AbstractFeatureSpecification source(Object source)
Specified by:
source in interface SourceAwareSpecification

source

public Object source()
Specified by:
source in interface SourceAwareSpecification

sourceName

public AbstractFeatureSpecification sourceName(String sourceName)
Specified by:
sourceName in interface SourceAwareSpecification

sourceName

public String sourceName()
Specified by:
sourceName in interface SourceAwareSpecification

execute

public void execute(SpecificationContext specificationContext)
Description copied from interface: FeatureSpecification
Execute this specification instance, carrying out the instructions specified within. Should work by delegating to an underlying FeatureSpecificationExecutor for proper separation of concerns.

Specified by:
execute in interface FeatureSpecification