Package eu.de4a.iem.xml
Class JAXBVersatileReader<JAXBTYPE,T>
- java.lang.Object
-
- eu.de4a.iem.xml.JAXBVersatileReader<JAXBTYPE,T>
-
- Type Parameters:
JAXBTYPE- internal JAXB typeT- Outside data type to be read
- All Implemented Interfaces:
IJAXBVersatileReader<T>
public class JAXBVersatileReader<JAXBTYPE,T> extends Object implements IJAXBVersatileReader<T>
Default implementation ofIJAXBVersatileReader- Author:
- Philip Helger
-
-
Constructor Summary
Constructors Constructor Description JAXBVersatileReader(com.helger.jaxb.IJAXBReader<JAXBTYPE> aReader, Function<JAXBTYPE,T> aMapper)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description Tread(Source aSource)Read a document from the specified source.Tread(Node aNode)Read a document from the specified DOM node.
-
-
-
Method Detail
-
read
@Nullable public T read(@Nonnull Source aSource)
Description copied from interface:IJAXBVersatileReaderRead 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:
readin interfaceIJAXBVersatileReader<JAXBTYPE>- Parameters:
aSource- The source to read. May not benull.- Returns:
nullin case reading fails.
-
read
@Nullable public T read(@Nonnull Node aNode)
Description copied from interface:IJAXBVersatileReaderRead 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:
readin interfaceIJAXBVersatileReader<JAXBTYPE>- Parameters:
aNode- The DOM node to read. May not benull.- Returns:
nullin case reading fails.
-
-