Class StringTrimmingAdapter


  • public class StringTrimmingAdapter
    extends javax.xml.bind.annotation.adapters.XmlAdapter<String,​String>
    An XML adapter that simply performs a null-safe trim on the value to be marshalled or unmarshalled.

    Only use this adapter when it is necessary for the remaining whitespace-related characters to remain as-is.

    Author:
    Kuali Rice Team (rice.collab@kuali.org)
    • Constructor Detail

      • StringTrimmingAdapter

        public StringTrimmingAdapter()
    • Method Detail

      • unmarshal

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

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