Class MixedContentAdapter


  • public class MixedContentAdapter
    extends javax.xml.bind.annotation.adapters.XmlAdapter<Content,​java.lang.String>
    JAXB doesn't allow both @XmlElement and @XmlValue annotations on the same object. This adapter can be used as a work-around.
    Author:
    jwhite
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      Content marshal​(java.lang.String value)  
      java.lang.String unmarshal​(Content content)  
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Constructor Detail

      • MixedContentAdapter

        public MixedContentAdapter()
    • Method Detail

      • unmarshal

        public java.lang.String unmarshal​(Content content)
        Specified by:
        unmarshal in class javax.xml.bind.annotation.adapters.XmlAdapter<Content,​java.lang.String>
      • marshal

        public Content marshal​(java.lang.String value)
        Specified by:
        marshal in class javax.xml.bind.annotation.adapters.XmlAdapter<Content,​java.lang.String>