java.lang.Object
com.inductiveautomation.ignition.common.xmlserialization.serialization.XMLSerializationContext

public class XMLSerializationContext extends Object
Used while serializing to keep track of references and indentation.
  • Field Details

  • Constructor Details

    • XMLSerializationContext

      public XMLSerializationContext(XMLSerializer serializer)
  • Method Details

    • serialize

      public Element serialize(Object obj) throws SerializationException
      Uses the SerializationDelegate registered for this type of object to serialize the object into an Element. If the delegate is flagged for reference tracking and this object is equal to one already serialized earlier, a <ref> object will be returned instead.
      Throws:
      SerializationException
    • getRefForElement

      public int getRefForElement(Element elm)
      Looks up the reference ID for the object within the Element, as long as the element doesn't have reference tracking turned off.
    • getCleanCopy

      public Object getCleanCopy(Class type) throws SerializationException
      Throws:
      SerializationException
    • getClassNameMap

      public ClassNameResolver getClassNameMap()
    • safeEquals

      public boolean safeEquals(Object foo, Object bar)
    • registerEqualityDelegate

      public void registerEqualityDelegate(Class<?> clazz, EqualityDelegate<?> delegate)
      Registers additional EqualityDelegates not already defined in the defaults for this class.