Package org.apache.ws.jaxme.js.util

Examples of org.apache.ws.jaxme.js.util.JavaParser


  private void doProcess(File f, File output) throws RecognitionException,
      TokenStreamException, IOException {
    logger.info("processing " + f.getAbsolutePath() + " to output "
        + output.getAbsolutePath());
    JavaSourceFactory javaSourceFactory = new JavaSourceFactory();
    JavaParser javaParser = new JavaParser(javaSourceFactory);
    javaParser.parse(f);
    Iterator iter = javaSourceFactory.getJavaSources();
    while (iter.hasNext()) {
      JavaSource sourceClass = (JavaSource) iter.next();
      JavaQName classQualifiedName = sourceClass.getQName();
      if (pattern.matcher(classQualifiedName.toString()).matches()) {
View Full Code Here


  private JavaSourceResolver getResolver()
      throws TokenStreamException, RecognitionException {
    final Map sourcesByName = new HashMap();
    final JavaSourceFactory jsf = new JavaSourceFactory();
    JavaParser parser = new JavaParser(jsf);
    for (int i = 0;  i < sources.length;  i++) {
      List list = parser.parse(new StringReader(sources[i]));
      for (int j = 0;  j < list.size();  j++) {
        JavaSource js = (JavaSource) list.get(i);
        register(sourcesByName, js);
      }
    }
View Full Code Here

        if (file == null) {
            InputStream istream = null;
            try {
                istream = url.openStream();
                Reader r = new InputStreamReader(istream);
                result = new JavaParser(pFactory).parse(r);
                istream.close();
                istream = null;
            } finally {
                if (istream != null) { try { istream.close(); } catch (Throwable ignore) {} }
            }
        } else {
            Reader r = null;
            try {
                r = new FileReader(file);
                result = new JavaParser(pFactory).parse(r);
                r.close();
                r = null;
            } finally {
                if (r != null) { try { r.close(); } catch (Throwable ignore) {} }
            }
View Full Code Here

TOP

Related Classes of org.apache.ws.jaxme.js.util.JavaParser

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.