org.jboss.deployers.spi.attachments.helpers
Class AbstractAttachments

java.lang.Object
  extended by org.jboss.deployers.spi.attachments.helpers.AbstractAttachments
All Implemented Interfaces:
Externalizable, Serializable, Attachments
Direct Known Subclasses:
AbstractMutableAttachments

public abstract class AbstractAttachments
extends Object
implements Attachments, Externalizable

AbstractAttachments.

Version:
$Revision: 1.1 $
Author:
Adrian Brock
See Also:
Serialized Form

Constructor Summary
AbstractAttachments()
           
 
Method Summary
<T> T
getAttachment(Class<T> type)
          Get attachment
<T> T
getAttachment(String name, Class<T> expectedType)
          Get attachment
 boolean isAttachmentPresent(Class<?> type)
          Is the attachment present
 boolean isAttachmentPresent(String name, Class<?> expectedType)
          Is the attachment present
 void readExternal(ObjectInput in)
           
 void writeExternal(ObjectOutput out)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 
Methods inherited from interface org.jboss.deployers.spi.attachments.Attachments
getAttachment, getAttachments, hasAttachments, isAttachmentPresent
 

Constructor Detail

AbstractAttachments

public AbstractAttachments()
Method Detail

getAttachment

public <T> T getAttachment(String name,
                           Class<T> expectedType)
Description copied from interface: Attachments
Get attachment

Specified by:
getAttachment in interface Attachments
Type Parameters:
T - the expected type
Parameters:
name - the name of the attachment
expectedType - the expected type
Returns:
the attachment or null if not present

getAttachment

public <T> T getAttachment(Class<T> type)
Description copied from interface: Attachments
Get attachment

Specified by:
getAttachment in interface Attachments
Type Parameters:
T - the expected type
Parameters:
type - the type
Returns:
the attachment or null if not present

isAttachmentPresent

public boolean isAttachmentPresent(String name,
                                   Class<?> expectedType)
Description copied from interface: Attachments
Is the attachment present

Specified by:
isAttachmentPresent in interface Attachments
Parameters:
name - the name of the attachment
expectedType - the expected type
Returns:
true when the attachment is present

isAttachmentPresent

public boolean isAttachmentPresent(Class<?> type)
Description copied from interface: Attachments
Is the attachment present

Specified by:
isAttachmentPresent in interface Attachments
Parameters:
type - the type
Returns:
true when the attachment is present

readExternal

public void readExternal(ObjectInput in)
                  throws IOException,
                         ClassNotFoundException
Specified by:
readExternal in interface Externalizable
Throws:
IOException
ClassNotFoundException

writeExternal

public void writeExternal(ObjectOutput out)
                   throws IOException
Specified by:
writeExternal in interface Externalizable
Throws:
IOException


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