@Test public void test() throws FileNotFoundException { Documentation<Type> resultsByFile = DocumentationReader.readDocumentation(DOMAIN_FILE, this.modelIndex); Documentation<Type> resultsByFilename = DocumentationReader.readDocumentation(DOMAIN_FILENAME, this.modelIndex); assertEquals(resultsByFile.getDomains().toString(), resultsByFilename.getDomains().toString()); }
public static final Documentation<Type> readDocumentation(final InputStream stream, final ModelIndex mapper) { if (stream == null) { throw new IllegalArgumentException("stream"); } final XMLInputFactory factory = XMLInputFactory.newInstance(); try { final XMLStreamReader reader = factory.createXMLStreamReader(stream); try { final Documentation<Type> model = readDocument(mapper, reader); return model; } finally { reader.close(); } } catch (final XMLStreamException e) { throw new DocumentGeneratorRuntimeException(e); } }
DocumentationReader { public static final Documentation<Type> readDocumentation(final InputStream stream, final ModelIndex mapper) { if (stream == null) { throw new IllegalArgumentException("stream"); } final XMLInputFactory factory = XMLInputFactory.newInstance(); try { final XMLStreamReader reader = factory.createXMLStreamReader(stream); try { final Documentation<Type> model = readDocument(mapper, reader); return model; } finally { reader.close(); } } catch (final XMLStreamException e) { throw new DocumentGeneratorRuntimeException(e); } } }
DocumentationReader { public static final Documentation<Type> readDocumentation(final InputStream stream, final ModelIndex mapper) { if (stream == null) { throw new IllegalArgumentException("stream"); } final XMLInputFactory factory = XMLInputFactory.newInstance(); try { final XMLStreamReader reader = factory.createXMLStreamReader(stream); try { final Documentation<Type> model = readDocument(mapper, reader); return model; } finally { reader.close(); } } catch (final XMLStreamException e) { throw new DocumentGeneratorRuntimeException(e); } } DocumentationReader(); }
DocumentationReader { public static final Documentation<Type> readDocumentation(final InputStream stream, final ModelIndex mapper) { if (stream == null) { throw new IllegalArgumentException("stream"); } final XMLInputFactory factory = XMLInputFactory.newInstance(); try { final XMLStreamReader reader = factory.createXMLStreamReader(stream); try { final Documentation<Type> model = readDocument(mapper, reader); return model; } finally { reader.close(); } } catch (final XMLStreamException e) { throw new DocumentGeneratorRuntimeException(e); } } DocumentationReader(); static final Documentation<Type> readDocumentation(final InputStream stream, final ModelIndex mapper); static final Documentation<Type> readDocumentation(final File file, final ModelIndex mapper); static final Documentation<Type> readDocumentation(final String fileName, final ModelIndex mapper); }
DocumentationReader { public static final Documentation<Type> readDocumentation(final InputStream stream, final ModelIndex mapper) { if (stream == null) { throw new IllegalArgumentException("stream"); } final XMLInputFactory factory = XMLInputFactory.newInstance(); try { final XMLStreamReader reader = factory.createXMLStreamReader(stream); try { final Documentation<Type> model = readDocument(mapper, reader); return model; } finally { reader.close(); } } catch (final XMLStreamException e) { throw new DocumentGeneratorRuntimeException(e); } } DocumentationReader(); static final Documentation<Type> readDocumentation(final InputStream stream, final ModelIndex mapper); static final Documentation<Type> readDocumentation(final File file, final ModelIndex mapper); static final Documentation<Type> readDocumentation(final String fileName, final ModelIndex mapper);  }