org.jboss.deployers.spi.deployer.helpers
Class ComponentAdapter<T>

java.lang.Object
  extended by org.jboss.deployers.spi.deployer.helpers.ComponentAdapter<T>
Type Parameters:
T - exact attachment type
Direct Known Subclasses:
AbstractComponentVisitor, AbstractDeploymentVisitor

public abstract class ComponentAdapter<T>
extends Object

Simple component adapter.

Author:
Ales Justin

Constructor Summary
ComponentAdapter()
           
 
Method Summary
protected  void addComponent(DeploymentUnit unit, T attachment)
          Add component.
protected abstract  String getAttachmentName(T attachment)
          Get attachment name.
protected abstract  String getComponentName(T attachment)
          Get component name.
protected  void removeComponent(DeploymentUnit unit, T attachment)
          Remove component.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

ComponentAdapter

public ComponentAdapter()
Method Detail

getComponentName

protected abstract String getComponentName(T attachment)
Get component name.

Parameters:
attachment - the attachment
Returns:
the component name

getAttachmentName

protected abstract String getAttachmentName(T attachment)
Get attachment name. By default we return visitor type's name.

Parameters:
attachment - the attachment
Returns:
the attachment name

addComponent

protected void addComponent(DeploymentUnit unit,
                            T attachment)
Add component.

Parameters:
unit - the deployment unit
attachment - the attachment

removeComponent

protected void removeComponent(DeploymentUnit unit,
                               T attachment)
Remove component.

Parameters:
unit - the deployment unit
attachment - the attachment


Copyright © 2011 JBoss, a division of Red Hat, Inc.. All Rights Reserved.