public final class HandleDeserializationEventArgs extends Object implements IEventArgs
HandleDeserialization
and HandleDeserialization
to let registered deserialization code perform the deserialization.
If the event handler determines that it can deserialize the XmlNode, it should place the result
into the Result property and thus mark the event as Handled.
EMPTY| Constructor and Description |
|---|
HandleDeserializationEventArgs(IParseContext context,
Node xmlNode,
Class targetType)
Initializes a new instance of the
HandleDeserializationEventArgs class. |
| Modifier and Type | Method and Description |
|---|---|
IParseContext |
getContext()
Gets the context in which the
XmlNode shall be deserialized. |
Object |
getResult()
Holds the result of the deserialization, which is
null initially. |
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. |
Node |
getXmlNode()
Gets the XML node that contains the data to deserialize.
|
boolean |
isHandled()
Gets a value indicating whether this
HandleDeserializationEventArgs is handled. |
void |
setHandled(boolean value)
Sets a value indicating whether this
HandleDeserializationEventArgs is handled. |
void |
setResult(Object value)
Holds the result of the deserialization, which is
null initially. |
public HandleDeserializationEventArgs(IParseContext context, Node xmlNode, Class targetType)
HandleDeserializationEventArgs class.context - The context in which serialization should take place.xmlNode - The XML element that contains the data to deserialize.targetType - The required target type of the Result.public final IParseContext getContext()
XmlNode shall be deserialized.public final Object getResult()
null initially.
Setting this property will automatically set the Handled property to true.
IllegalArgumentException - If the value is not assignable to TargetTypesetResult(Object)public final Class getTargetType()
null if the target
type is not known in advance.IParseContext.deserialize(Class, IParseContext, Node)public final Node getXmlNode()
public final boolean isHandled()
HandleDeserializationEventArgs is handled.
Setting this property to true indicates to the event source that the Result has been
assigned and that the event should not be propagated to further listeners.
true if this event has been handled; false otherwise.setHandled(boolean)public final void setHandled(boolean value)
HandleDeserializationEventArgs is handled.
Setting this property to true indicates to the event source that the Result has been
assigned and that the event should not be propagated to further listeners.
value - true if this event has been handled; false otherwise.isHandled()public final void setResult(Object value)
null initially.
Setting this property will automatically set the Handled property to true.
IllegalArgumentException - If the value is not assignable to TargetTypevalue - The Result to set.getResult()