org.springframework.jee.inject
Class ChainedProcessorsComponentContributor

java.lang.Object
  extended by org.springframework.jee.inject.ChainedProcessorsComponentContributor
All Implemented Interfaces:
ComponentContributor
Direct Known Subclasses:
AnnotationComponentContributor, BeanDefinitionAnnotationComponentContributor

public abstract class ChainedProcessorsComponentContributor
extends java.lang.Object
implements ComponentContributor

Support for annotation-based component contributors that uses internally a chain of metadata processors.

Author:
Rod Johnson, Costin Leau

Field Summary
static java.util.List<MetadataProcessor> DEFAULT_PROCESSORS
          Default list of metadata processors.
static java.util.List<MetadataProcessor> INTERCEPTION_PROCESSORS
          Jsr250 and Interception chain.
static java.util.List<MetadataProcessor> JSR250_PROCESSORS
          Jsr250 only processing chain.
protected  org.apache.commons.logging.Log log
           
protected  java.util.List<MetadataProcessor> metadataProcessors
           
 
Constructor Summary
ChainedProcessorsComponentContributor()
           
 
Method Summary
 Jsr250Metadata findComponentMetadata(java.lang.String componentName, java.lang.Class<?> componentClass, DeploymentUnitMetadata dum)
          Subclasses should call this to contribute a single component.
 Jsr250Metadata newJsr250Metadata(java.lang.String componentName, java.lang.Class<?> componentClass, DeploymentUnitMetadata dum)
          Subclasses can override this to return an Jsr250Metadata subclass of their choice
 void setMetadataProcessors(java.util.List<MetadataProcessor> processors)
          Metadata processor chain setter.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 
Methods inherited from interface org.springframework.jee.inject.ComponentContributor
contribute
 

Field Detail

log

protected final org.apache.commons.logging.Log log

DEFAULT_PROCESSORS

public static final java.util.List<MetadataProcessor> DEFAULT_PROCESSORS
Default list of metadata processors. Contains the Jsr250, Interception and Transaction processor.


JSR250_PROCESSORS

public static final java.util.List<MetadataProcessor> JSR250_PROCESSORS
Jsr250 only processing chain.


INTERCEPTION_PROCESSORS

public static final java.util.List<MetadataProcessor> INTERCEPTION_PROCESSORS
Jsr250 and Interception chain.


metadataProcessors

protected java.util.List<MetadataProcessor> metadataProcessors
Constructor Detail

ChainedProcessorsComponentContributor

public ChainedProcessorsComponentContributor()
Method Detail

findComponentMetadata

public Jsr250Metadata findComponentMetadata(java.lang.String componentName,
                                            java.lang.Class<?> componentClass,
                                            DeploymentUnitMetadata dum)
Subclasses should call this to contribute a single component. Their implementation of contribute() should normally loop over calling this method.
Can also be called directly.

Parameters:
componentName - name of the component
componentClass - component class
dum - DeploymentUnitMetadata to which this component relates

newJsr250Metadata

public Jsr250Metadata newJsr250Metadata(java.lang.String componentName,
                                        java.lang.Class<?> componentClass,
                                        DeploymentUnitMetadata dum)
Subclasses can override this to return an Jsr250Metadata subclass of their choice

Specified by:
newJsr250Metadata in interface ComponentContributor
Parameters:
componentName - component name
componentClass - class of the component
dum - deployment unit metadata
Returns:
new instance of Jsr250Metadata or a subclass

setMetadataProcessors

public void setMetadataProcessors(java.util.List<MetadataProcessor> processors)
Metadata processor chain setter.

Parameters:
processors -


Copyright 2006 Interface21. All Rights Reserved.