public class NullHandler extends java.lang.Object implements DeserializationHandler
Constructor and Description |
---|
NullHandler() |
Modifier and Type | Method and Description |
---|---|
DeserializationHandler |
clone()
Clones this handler.
|
void |
endElement(DeserializationContext context)
Notifies the handler that their element has ended.
|
void |
endObject(java.lang.Object obj)
Notifies the handler that an object tag was found and deserialized within their scope
|
void |
endSubElement(java.lang.String name,
DeserializationContext context)
Notifies the handler that a sub-element has ended
|
Decoder<?> |
getBodyDecoder()
Called when body data is encountered in this tag or a sub-tag.
|
java.lang.String |
getElementName()
Returns the name of the element type that this handler ...
|
java.lang.Object |
getObject()
Returns the most recent object that this handler created.
|
int |
getRefId()
Returns the reference id that was in the start of this element, or -1 if there was none
|
void |
onBody(java.lang.Object body)
Called when body data is encountered in this tag or a sub-tag.
|
void |
setRefId(int id)
Sets the ref-id that was found at the start of this element, if any.
|
void |
startElement(java.lang.String name,
AttributesMap attributes,
DeserializationContext context)
Notifies the handler that their element has started.
|
void |
startSubElement(java.lang.String name,
AttributesMap attributes,
DeserializationContext context)
Notifies the handler that a sub-element has started.
|
boolean |
supportsNestedElements()
Return true if the element type that you're parsing can have nested elements, or false if you're a singleton
element.
|
public void onBody(java.lang.Object body)
DeserializationHandler
DeserializationHandler.getBodyDecoder()
), and then this function will be called.onBody
in interface DeserializationHandler
public Decoder<?> getBodyDecoder()
DeserializationHandler
DeserializationHandler.onBody(Object)
getBodyDecoder
in interface DeserializationHandler
public void endElement(DeserializationContext context) throws java.lang.Exception
DeserializationHandler
endElement
in interface DeserializationHandler
java.lang.Exception
public void endObject(java.lang.Object obj)
DeserializationHandler
endObject
in interface DeserializationHandler
public void endSubElement(java.lang.String name, DeserializationContext context) throws java.lang.Exception
DeserializationHandler
endSubElement
in interface DeserializationHandler
java.lang.Exception
public java.lang.String getElementName()
DeserializationHandler
getElementName
in interface DeserializationHandler
public void startElement(java.lang.String name, AttributesMap attributes, DeserializationContext context) throws java.lang.Exception
DeserializationHandler
startElement
in interface DeserializationHandler
java.lang.Exception
public void startSubElement(java.lang.String name, AttributesMap attributes, DeserializationContext context) throws java.lang.Exception
DeserializationHandler
startSubElement
in interface DeserializationHandler
java.lang.Exception
public java.lang.Object getObject()
DeserializationHandler
getObject
in interface DeserializationHandler
public boolean supportsNestedElements()
DeserializationHandler
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.
supportsNestedElements
in interface DeserializationHandler
public DeserializationHandler clone()
DeserializationHandler
clone
in interface DeserializationHandler
clone
in class java.lang.Object
public int getRefId()
DeserializationHandler
getRefId
in interface DeserializationHandler
public void setRefId(int id)
DeserializationHandler
setRefId
in interface DeserializationHandler