|
Search this API | ||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object java.util.EventObject y.io.graphml.output.SerializationEvent
public final class SerializationEvent
The event arguments used by SerializationHandler
s
to let registered serialization code perform the serialization of items.
If the event handler determines that it can serialize the getItem()
, it should use the getWriter()
for output and mark the event as isHandled()
so that other code will not perform serialization, too.
Field Summary |
---|
Fields inherited from class java.util.EventObject |
---|
source |
Constructor Summary | |
---|---|
SerializationEvent(java.lang.Object source,
GraphMLWriteContext context,
java.lang.Object item)
Initializes a new instance of the SerializationEvent class
the item . |
|
SerializationEvent(java.lang.Object source,
GraphMLWriteContext context,
java.lang.Object item,
java.lang.Class serializationType)
Initializes a new instance of the SerializationEvent class
the item |
Method Summary | |
---|---|
GraphMLWriteContext |
getContext()
Gets the context to be used for writing. |
java.lang.Object |
getItem()
Gets the item that should be serialized. |
XmlWriter |
getWriter()
Gets the writer for writing the xml output. |
boolean |
isHandled()
Gets a value indicating whether this SerializationEvent is handled. |
void |
setHandled(boolean value)
Sets a value indicating whether this SerializationEvent is handled. |
java.lang.Class |
SourceType()
Declares the type in the inheritance of the getItem() that should be used for serialization. |
Methods inherited from class java.util.EventObject |
---|
getSource, toString |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Constructor Detail |
---|
public SerializationEvent(java.lang.Object source, GraphMLWriteContext context, java.lang.Object item)
SerializationEvent
class
the item
.
This constructor initializes the SourceType()
to null
.
source
- The source where the event was raised.context
- The context to use for writing.item
- The item to to serialize.public SerializationEvent(java.lang.Object source, GraphMLWriteContext context, java.lang.Object item, java.lang.Class serializationType)
SerializationEvent
class
the item
source
- The source where the event was raised.context
- The context to use for writing.item
- The item to to serialize.serializationType
- The type that should be used for serialization, which needs to be a super type or interface of the
item
or null
.Method Detail |
---|
public java.lang.Object getItem()
public java.lang.Class SourceType()
getItem()
that should be used for serialization.
null
if the type should be inferred from the getItem()
.public boolean isHandled()
SerializationEvent
is handled.
A true
value indicates to the event source that the getItem()
has been successfully serialized using the getWriter()
and no other code needs to handle the
serialization request, anymore.
true
if this event has been handled;
false
otherwise.public void setHandled(boolean value)
SerializationEvent
is handled.
Setting this property to true
indicates to the event source that the getItem()
has been successfully serialized using the getWriter()
and no other code needs to handle the
serialization request, anymore.
value
- true
if this event has been handled;
false
otherwise.public GraphMLWriteContext getContext()
public XmlWriter getWriter()
|
© Copyright 2000-2022, yWorks GmbH. All rights reserved. |
||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |