com.github.antlrjavaparser
Class JavaParser

java.lang.Object
  extended by com.github.antlrjavaparser.JavaParser

public class JavaParser
extends Object

Created with IntelliJ IDEA. User: Mike De Haan Date: 12/27/12 Time: 7:34 PM To change this template use File | Settings | File Templates.


Method Summary
static CompilationUnit parse(File file)
          Parses the Java code contained in a File and returns a CompilationUnit that represents it.
static CompilationUnit parse(InputStream in)
          Parses the Java code contained in the InputStream and returns a CompilationUnit that represents it.
static CompilationUnit parse(String javaSource)
          Parses a UTF-8 encoded string as java source.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Method Detail

parse

public static CompilationUnit parse(InputStream in)
                             throws IOException,
                                    ParseException
Parses the Java code contained in the InputStream and returns a CompilationUnit that represents it.

Parameters:
in - InputStream containing Java source code
Returns:
CompilationUnit representing the Java source code
Throws:
IOException
ParseException

parse

public static CompilationUnit parse(File file)
                             throws IOException,
                                    ParseException
Parses the Java code contained in a File and returns a CompilationUnit that represents it.

Parameters:
file - File containing Java source code
Returns:
CompilationUnit representing the Java source code
Throws:
IOException
ParseException

parse

public static CompilationUnit parse(String javaSource)
                             throws IOException,
                                    ParseException
Parses a UTF-8 encoded string as java source.

Parameters:
javaSource -
Returns:
Throws:
IOException
ParseException


Copyright © 2013. All Rights Reserved.