|
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.input.DeserializationEvent
public final class DeserializationEvent
The event arguments used by DeserializationHandler
implementations
to let registered deserialization code perform the deserialization.
If the event handler determines that it can deserialize the getXmlNode()
, it should place the result into
the getResult()
property and thus mark the event as isHandled()
.
Field Summary |
---|
Fields inherited from class java.util.EventObject |
---|
source |
Constructor Summary | |
---|---|
DeserializationEvent(java.lang.Object source,
GraphMLParseContext context,
org.w3c.dom.Node xmlNode)
Initializes a new instance of the DeserializationEvent class. |
|
DeserializationEvent(java.lang.Object source,
GraphMLParseContext context,
org.w3c.dom.Node xmlNode,
java.lang.Class targetType)
Initializes a new instance of the DeserializationEvent class. |
Method Summary | |
---|---|
GraphMLParseContext |
getContext()
Gets the context in which the getXmlNode() shall be deserialized. |
java.lang.Object |
getResult()
Holds the result of the deserialization, which is null initially. |
java.lang.Class |
getTargetType()
Gets the type of the resulting instance that is required by the requesting deserializer or null
if the target type is not known in advance. |
org.w3c.dom.Node |
getXmlNode()
Gets the XML node that contains the data to deserialize. |
boolean |
isHandled()
Gets a value indicating whether this DeserializationEvent is handled. |
void |
setHandled(boolean value)
Sets a value indicating whether this DeserializationEvent is handled. |
void |
setResult(java.lang.Object value)
Holds the result of the deserialization, which is null initially. |
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 DeserializationEvent(java.lang.Object source, GraphMLParseContext context, org.w3c.dom.Node xmlNode)
DeserializationEvent
class.
This initializes the getTargetType()
source
- The source where the event is raised.context
- The context in which serialization should take place.xmlNode
- The XML element that contains the data to deserialize.public DeserializationEvent(java.lang.Object source, GraphMLParseContext context, org.w3c.dom.Node xmlNode, java.lang.Class targetType)
DeserializationEvent
class.
source
- The source where the event is raised.context
- The context in which serialization should take place.xmlNode
- The XML element that contains the data to deserialize.targetType
- optional getTargetType()
of the getResult()
.GraphMLParseContext.deserialize(GraphMLParseContext,org.w3c.dom.Node,Class)
Method Detail |
---|
public java.lang.Class getTargetType()
null
if the target type is not known in advance.
GraphMLParseContext.deserialize(GraphMLParseContext, org.w3c.dom.Node, Class)
public java.lang.Object getResult()
null
initially.
This value is only meaningful if isHandled()
is true
.
isHandled()
,
setResult(Object)
public void setResult(java.lang.Object value)
null
initially.
Setting this property will automatically set the isHandled()
property to
true
.
value
- the result of the deserialization.
java.lang.IllegalArgumentException
- If the value is not assignable to getTargetType()
getTargetType()
,
setHandled(boolean)
,
getResult()
public boolean isHandled()
DeserializationEvent
is handled.
true
if this event has been handled;
false
otherwise.setHandled(boolean)
,
getResult()
public void setHandled(boolean value)
DeserializationEvent
is handled.
Setting this property to true
indicates to the event source that the getResult()
has been assigned and that the event should not be propagated to further listeners.
value
- true
if this event has been handled;
false
otherwise.setResult(Object)
,
isHandled()
public GraphMLParseContext getContext()
getXmlNode()
shall be deserialized.
public org.w3c.dom.Node getXmlNode()
|
© Copyright 2000-2022, yWorks GmbH. All rights reserved. |
||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |