parse
Parses the Java code contained in the InputStream and returns a CompilationUnit that represents it.
Return
CompilationUnit representing the Java source code
Parameters
InputStream containing Java source code. It will be closed after parsing.
Throws
if the source code has parser errors
Parses the Java code contained in a File and returns a CompilationUnit that represents it.
Return
CompilationUnit representing the Java source code
Parameters
File containing Java source code. It will be closed after parsing.
Throws
if the source code has parser errors
the file was not found
Parses the Java code contained in a file and returns a CompilationUnit that represents it.
Return
CompilationUnit representing the Java source code
Parameters
path to a file containing Java source code
Throws
if the source code has parser errors
the path could not be accessed
Parses Java code from a Reader and returns a CompilationUnit that represents it.
Return
CompilationUnit representing the Java source code
Parameters
the reader containing Java source code. It will be closed after parsing.
Throws
if the source code has parser errors
Parses the Java code contained in code and returns a CompilationUnit that represents it.
Return
CompilationUnit representing the Java source code
Parameters
Java source code
Throws
if the source code has parser errors
Deprecated
set the encoding in the ParserConfiguration
Parses the Java code contained in the InputStream and returns a CompilationUnit that represents it.
Return
CompilationUnit representing the Java source code
Parameters
InputStream containing Java source code. It will be closed after parsing.
encoding of the source code
Throws
if the source code has parser errors
Deprecated
set the encoding in the ParserConfiguration
Parses the Java code contained in a File and returns a CompilationUnit that represents it.
Return
CompilationUnit representing the Java source code
Parameters
File containing Java source code. It will be closed after parsing.
encoding of the source code
Throws
if the source code has parser errors
the file was not found
Deprecated
set the encoding in the ParserConfiguration
Parses the Java code contained in a file and returns a CompilationUnit that represents it.
Return
CompilationUnit representing the Java source code
Parameters
path to a file containing Java source code
encoding of the source code
Throws
the path could not be accessed
if the source code has parser errors