Class JAXBVersatileReader<JAXBTYPE,​T>

    • Constructor Detail

      • JAXBVersatileReader

        public JAXBVersatileReader​(@Nonnull
                                   com.helger.jaxb.IJAXBReader<JAXBTYPE> aReader,
                                   @Nonnull
                                   Function<JAXBTYPE,​T> aMapper)
    • Method Detail

      • read

        @Nullable
        public T read​(@Nonnull
                      Source aSource)
        Description copied from interface: IJAXBVersatileReader
        Read a document from the specified source. The secure reading feature has NO affect when using this method because the parameter type is too generic.
        Specified by:
        read in interface IJAXBVersatileReader<JAXBTYPE>
        Parameters:
        aSource - The source to read. May not be null.
        Returns:
        null in case reading fails.
      • read

        @Nullable
        public T read​(@Nonnull
                      Node aNode)
        Description copied from interface: IJAXBVersatileReader
        Read a document from the specified DOM node. The secure reading feature has NO affect when using this method because no parsing happens! To ensure secure reading the Node must first be serialized to a String and be parsed again!
        Specified by:
        read in interface IJAXBVersatileReader<JAXBTYPE>
        Parameters:
        aNode - The DOM node to read. May not be null.
        Returns:
        null in case reading fails.