Class XMLObjectSource


  • public class XMLObjectSource
    extends Object
    A bean class which can be optionally used to represent the original source byte[] from which an XMLObject was parsed and unmarshalled.

    It will typically be attached to an XML object via its XMLObject.getObjectMetadata().

    This may be optionally used by some components to re-persist the object in a more performant manner, at the expense of carrying the additional in-memory storage.

    If present, it will be removed from the object when the object is mutated. See AbstractXMLObject.releaseDOM(), which is invoked by the various overloaded prepareForAssignment methods there.

    • Field Detail

      • source

        @Nonnull
        @NotEmpty
        private byte[] source
        The object source byte[].
    • Constructor Detail

      • XMLObjectSource

        public XMLObjectSource​(@Nonnull @NotEmpty
                               byte[] objectSource)
        Constructor.
        Parameters:
        objectSource - the object source byte[]
    • Method Detail

      • getObjectSource

        @Nonnull
        public byte[] getObjectSource()
        Get the object source byte[].
        Returns:
        the object source byte[]
      • hashCode

        public int hashCode()
        Overrides:
        hashCode in class Object