public class JavaParser extends Object
| Modifier and Type | Method and Description |
|---|---|
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.
|
public static CompilationUnit parse(InputStream in) throws IOException, ParseException
InputStream and returns
a CompilationUnit that represents it.in - InputStream containing Java source codeIOExceptionParseExceptionpublic static CompilationUnit parse(File file) throws IOException, ParseException
File and returns
a CompilationUnit that represents it.file - File containing Java source codeIOExceptionParseExceptionpublic static CompilationUnit parse(String javaSource) throws IOException, ParseException
javaSource - IOExceptionParseExceptionCopyright © 2013. All Rights Reserved.