Class StringAdapter

  • Direct Known Subclasses:
    TrimAdapter

    public class StringAdapter
    extends javax.xml.bind.annotation.adapters.XmlAdapter<java.lang.String,​java.lang.String>
    An XmlAdapter that implements useful features after parsing XML strings with JAXB.

    Supported features are:

    • [#2401] String-trimming, taking out whitespace from JAXB-bound XML content.
    • [#4550] Property expression resolution
    Author:
    Lukas Eder
    • Constructor Summary

      Constructors 
      Constructor Description
      StringAdapter()  
    • Method Summary

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

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

      • StringAdapter

        public StringAdapter()
    • Method Detail

      • unmarshal

        public final java.lang.String unmarshal​(java.lang.String v)
                                         throws java.lang.Exception
        Specified by:
        unmarshal in class javax.xml.bind.annotation.adapters.XmlAdapter<java.lang.String,​java.lang.String>
        Throws:
        java.lang.Exception
      • marshal

        public final java.lang.String marshal​(java.lang.String v)
                                       throws java.lang.Exception
        Specified by:
        marshal in class javax.xml.bind.annotation.adapters.XmlAdapter<java.lang.String,​java.lang.String>
        Throws:
        java.lang.Exception