Interface DeserializationHandler
- All Known Implementing Classes:
- AbstractBodyDecoderHandler,- AbstractDeserializationHandler,- AbstractReentrantDeserializationHandler,- ArrayHandler,- ArrayListHandler,- AssociatedDataHandler,- BitSetHandler,- BooleanHandler,- ByteArrayHandler,- ClassHandler,- ColorHandler,- ColorStateHandler,- ComponentDeserializationHandler,- CursorHandler,- DateHandler,- DimensionHandler,- Ellipse2DDoubleHandler,- Ellipse2DFloatHandler,- EnumHandler,- EnumSetHandler,- FontHandler,- GeneralPathHandler,- IgPathHandler,- InsetsHandler,- LayoutConstraintsHandler,- MethodHandler,- NullHandler,- NumberHandler,- ObjectDeserializationHandler,- Point2DDoubleHandler,- Point2DFloatHandler,- PointHandler,- PrimitiveArrayHandler,- QualifiedPathHandler,- QualityCodeHandler,- Rectangle2DDoubleHandler,- Rectangle2DFloatHandler,- RectangleHandler,- RoundRectangle2DDoubleHandler,- RoundRectangle2DFloatHandler,- ShapeDeserializationHandler,- StringHandler,- TagPathHandler,- TagQualityHandler,- UUIDHandler
public interface DeserializationHandler
A deserialization handler handles a section of an XML parsing for a specific element. Each element that is not
 another element's namespace child needs to produce an Object.
- 
Method SummaryModifier and TypeMethodDescriptionclone()Clones this handler.voidendElement(DeserializationContext context) Notifies the handler that their element has ended.voidNotifies the handler that an object tag was found and deserialized within their scopevoidendSubElement(String name, DeserializationContext context) Notifies the handler that a sub-element has endedDecoder<?>Called when body data is encountered in this tag or a sub-tag.Returns the name of the element type that this handler ...Returns the most recent object that this handler created.intgetRefId()Returns the reference id that was in the start of this element, or -1 if there was nonevoidCalled when body data is encountered in this tag or a sub-tag.voidsetRefId(int id) Sets the ref-id that was found at the start of this element, if any.voidstartElement(String name, AttributesMap attributes, DeserializationContext context) Notifies the handler that their element has started.voidstartSubElement(String name, AttributesMap attributes, DeserializationContext context) Notifies the handler that a sub-element has started.booleanReturn true if the element type that you're parsing can have nested elements, or false if you're a singleton element.
- 
Method Details- 
startElementvoid startElement(String name, AttributesMap attributes, DeserializationContext context) throws Exception Notifies the handler that their element has started.- Throws:
- Exception
 
- 
endElementNotifies the handler that their element has ended.- Throws:
- Exception
 
- 
getObjectObject getObject()Returns the most recent object that this handler created. Note that a handler needs to have this function return its object as early as possible, not just after endElement() has been called. This is used for populating the reference map.
- 
startSubElementvoid startSubElement(String name, AttributesMap attributes, DeserializationContext context) throws Exception Notifies the handler that a sub-element has started.- Throws:
- Exception
 
- 
endSubElementNotifies the handler that a sub-element has ended- Throws:
- Exception
 
- 
onBodyCalled when body data is encountered in this tag or a sub-tag. This data is first interpreted by the handler-provided decoder (seegetBodyDecoder()), and then this function will be called.
- 
getBodyDecoderDecoder<?> getBodyDecoder()Called when body data is encountered in this tag or a sub-tag. Used to decode the body into an object, which is then passed toonBody(Object)
- 
endObjectNotifies the handler that an object tag was found and deserialized within their scope
- 
getRefIdint getRefId()Returns the reference id that was in the start of this element, or -1 if there was none
- 
setRefIdvoid setRefId(int id) Sets the ref-id that was found at the start of this element, if any.
- 
getElementNameString getElementName()Returns the name of the element type that this handler ... handles.
- 
supportsNestedElementsboolean supportsNestedElements()Return true if the element type that you're parsing can have nested elements, or false if you're a singleton element. If you return true, you need to implement clone(). Note As of Ignition 7.6.5 with support for multi-deserialization, you should also return true from this and implement clone() if your return object is mutable, otherwise instances may be shared amongst multi-deserialized objects. 
- 
cloneDeserializationHandler clone()Clones this handler. Only handlers that support nested elements will be cloned, all others can throw an unsupported operation exception instead.
 
-