|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectcom.guiseframework.component.transfer.AbstractObjectTransferable<S>
S - The source of the transfer.public abstract class AbstractObjectTransferable<S>
A abstract transferable that carries one or more Java objects.
A subclass must implement Transferable.transfer(Class).
| Constructor Summary | |
|---|---|
AbstractObjectTransferable(S source,
java.lang.Class<?>... objectClasses)
Source and object esclass constructor. |
|
| Method Summary | |
|---|---|
boolean |
canTransfer(com.globalmentor.net.ContentType contentType)
Determines whether this transferable can transfer data with the given content type. |
protected java.lang.Class<?> |
getClass(com.globalmentor.net.ContentType contentType)
Determines the class this content type matches. |
com.globalmentor.net.ContentType[] |
getContentTypes()
Determines the content types available for this transfer. |
S |
getSource()
|
java.lang.Object |
transfer(com.globalmentor.net.ContentType contentType)
Transfers data using the given content type. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Methods inherited from interface com.guiseframework.component.transfer.Transferable |
|---|
transfer |
| Constructor Detail |
|---|
public AbstractObjectTransferable(S source,
java.lang.Class<?>... objectClasses)
source - The source of the transferable data.objectClasses - The classes indicating the typees of object to be transferred.
java.lang.NullPointerException - if the provided source and/or object classes is null.| Method Detail |
|---|
public S getSource()
getSource in interface Transferable<S>protected java.lang.Class<?> getClass(com.globalmentor.net.ContentType contentType)
contentType - The type of data requested, which may include wildcards.
null if no supported class matches the requested content type.public boolean canTransfer(com.globalmentor.net.ContentType contentType)
canTransfer in interface Transferable<S>contentType - The type of data requested, which may include wildcards.
true if this object can transfer data with the requested content type.public java.lang.Object transfer(com.globalmentor.net.ContentType contentType)
Transferable.transfer(Class).
transfer in interface Transferable<S>contentType - The type of data expected.
null.
java.lang.IllegalArgumentException - if the given content type is not supported.public com.globalmentor.net.ContentType[] getContentTypes()
application/x-java-object;class=package.Class.
getContentTypes in interface Transferable<S>
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||