Class DiscardElementMapper

  • All Implemented Interfaces:
    org.jibx.runtime.IMarshaller, org.jibx.runtime.IUnmarshaller

    public class DiscardElementMapper
    extends Object
    implements org.jibx.runtime.IMarshaller, org.jibx.runtime.IUnmarshaller

    Custom marshaller/unmarshaller for arbitrary ignored element. This ignores an element when unmarshalling, if one is present, and does nothing when marshalling.

    Author:
    Dennis M. Sosnoski
    • Constructor Detail

      • DiscardElementMapper

        public DiscardElementMapper()
    • Method Detail

      • isExtension

        public boolean isExtension​(String mapname)
        Specified by:
        isExtension in interface org.jibx.runtime.IMarshaller
      • marshal

        public void marshal​(Object obj,
                            org.jibx.runtime.IMarshallingContext ictx)
        Specified by:
        marshal in interface org.jibx.runtime.IMarshaller
      • isPresent

        public boolean isPresent​(org.jibx.runtime.IUnmarshallingContext ctx)
                          throws org.jibx.runtime.JiBXException
        Specified by:
        isPresent in interface org.jibx.runtime.IUnmarshaller
        Throws:
        org.jibx.runtime.JiBXException
      • unmarshal

        public Object unmarshal​(Object obj,
                                org.jibx.runtime.IUnmarshallingContext ictx)
                         throws org.jibx.runtime.JiBXException
        Specified by:
        unmarshal in interface org.jibx.runtime.IUnmarshaller
        Throws:
        org.jibx.runtime.JiBXException