Class LanguageUnmarshallerListener


  • public final class LanguageUnmarshallerListener
    extends javax.xml.bind.Unmarshaller.Listener
    Listens to unmarshal events in order to assign a parent object's xml:lang attribute to its child elements. This is important because the language of a parent is implicitly inherited to its children. If a child element were detached from it's parent the language information would be lost.

    This even may lead to misbehavior, e.g. when calculating the Entity Capabilities hash, which takes the language into account.

    • Constructor Detail

      • LanguageUnmarshallerListener

        public LanguageUnmarshallerListener​(Locale rootLocale)
    • Method Detail

      • afterUnmarshal

        public final void afterUnmarshal​(Object target,
                                         Object parent)
        Overrides:
        afterUnmarshal in class javax.xml.bind.Unmarshaller.Listener
      • beforeUnmarshal

        public final void beforeUnmarshal​(Object target,
                                          Object parent)
        Overrides:
        beforeUnmarshal in class javax.xml.bind.Unmarshaller.Listener