Class XMLObjectSource

java.lang.Object
org.opensaml.core.xml.util.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 Details

    • source

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

    • XMLObjectSource

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

    • getObjectSource

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

      public String toString()
      Overrides:
      toString in class Object
    • hashCode

      public int hashCode()
      Overrides:
      hashCode in class Object
    • equals

      public boolean equals(Object obj)
      Overrides:
      equals in class Object