/** * Method that should be used to add dynamic support for * {@link XMLStreamReader2}. Method will check whether the * stream reader passed happens to be a {@link XMLStreamReader2}; * and if it is, return it properly cast. If not, it will create * necessary wrapper. */ public static XMLStreamReader2 wrapIfNecessary(XMLStreamReader sr) { if (sr instanceof XMLStreamReader2) { return (XMLStreamReader2) sr; } return new Stax2ReaderAdapter(sr); }
/** * Method that should be used to add dynamic support for * {@link XMLStreamReader2}. Method will check whether the * stream reader passed happens to be a {@link XMLStreamReader2}; * and if it is, return it properly cast. If not, it will create * necessary wrapper to support features needed by StaxMate, * using vanilla Stax 1.0 interface. */ public static XMLStreamReader2 wrapIfNecessary(XMLStreamReader sr) { if (sr instanceof XMLStreamReader2) { return (XMLStreamReader2) sr; } return new Stax2ReaderAdapter(sr); }
/** * Method that should be used to add dynamic support for * {@link XMLStreamReader2}. Method will check whether the * stream reader passed happens to be a {@link XMLStreamReader2}; * and if it is, return it properly cast. If not, it will create * necessary wrapper to support features needed by StaxMate, * using vanilla Stax 1.0 interface. */ public static XMLStreamReader2 wrapIfNecessary(XMLStreamReader sr) { if (sr instanceof XMLStreamReader2) { return (XMLStreamReader2) sr; } return new Stax2ReaderAdapter(sr); }
/** * Method that should be used to add dynamic support for * {@link XMLStreamReader2}. Method will check whether the * stream reader passed happens to be a {@link XMLStreamReader2}; * and if it is, return it properly cast. If not, it will create * necessary wrapper to support features needed by StaxMate, * using vanilla Stax 1.0 interface. */ public static XMLStreamReader2 wrapIfNecessary(XMLStreamReader sr) { if (sr instanceof XMLStreamReader2) { return (XMLStreamReader2) sr; } return new Stax2ReaderAdapter(sr); }