org.apache.tuscany.sca.contribution.processor
Class DefaultStAXAttributeProcessorExtensionPoint

java.lang.Object
  extended by org.apache.tuscany.sca.contribution.processor.DefaultStAXAttributeProcessorExtensionPoint
All Implemented Interfaces:
ArtifactProcessorExtensionPoint<StAXAttributeProcessor>, StAXAttributeProcessorExtensionPoint

public class DefaultStAXAttributeProcessorExtensionPoint
extends java.lang.Object
implements StAXAttributeProcessorExtensionPoint

The default implementation of an extension point for StAX artifact processors.


Field Summary
protected  java.util.Map<java.lang.Object,P> processorsByArtifactType
           
protected  java.util.Map<java.lang.Class<?>,P> processorsByModelType
           
 
Constructor Summary
DefaultStAXAttributeProcessorExtensionPoint(ExtensionPointRegistry extensionPoints)
          Constructs a new extension point.
 
Method Summary
 void addArtifactProcessor(StAXAttributeProcessor artifactProcessor)
          Add an artifact processor.
 StAXAttributeProcessor getProcessor(java.lang.Class<?> modelType)
          Returns the processor associated with the given model type.
 StAXAttributeProcessor getProcessor(java.lang.Object artifactType)
          Returns the processor associated with the given artifact type.
 void removeArtifactProcessor(StAXAttributeProcessor artifactProcessor)
          Remove an artifact processor.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

processorsByArtifactType

protected final java.util.Map<java.lang.Object,P> processorsByArtifactType

processorsByModelType

protected final java.util.Map<java.lang.Class<?>,P> processorsByModelType
Constructor Detail

DefaultStAXAttributeProcessorExtensionPoint

public DefaultStAXAttributeProcessorExtensionPoint(ExtensionPointRegistry extensionPoints)
Constructs a new extension point.

Method Detail

addArtifactProcessor

public void addArtifactProcessor(StAXAttributeProcessor artifactProcessor)
Description copied from interface: ArtifactProcessorExtensionPoint
Add an artifact processor.

Specified by:
addArtifactProcessor in interface ArtifactProcessorExtensionPoint<StAXAttributeProcessor>
Parameters:
artifactProcessor - The artifact processor to add

removeArtifactProcessor

public void removeArtifactProcessor(StAXAttributeProcessor artifactProcessor)
Description copied from interface: ArtifactProcessorExtensionPoint
Remove an artifact processor.

Specified by:
removeArtifactProcessor in interface ArtifactProcessorExtensionPoint<StAXAttributeProcessor>
Parameters:
artifactProcessor - The artifact processor to remove

getProcessor

public StAXAttributeProcessor getProcessor(java.lang.Class<?> modelType)
Returns the processor associated with the given model type.

Specified by:
getProcessor in interface ArtifactProcessorExtensionPoint<StAXAttributeProcessor>
Parameters:
modelType - A model type
Returns:
The processor associated with the given model type

getProcessor

public StAXAttributeProcessor getProcessor(java.lang.Object artifactType)
Returns the processor associated with the given artifact type.

Specified by:
getProcessor in interface ArtifactProcessorExtensionPoint<StAXAttributeProcessor>
Parameters:
artifactType - An artifact type
Returns:
The processor associated with the given artifact type