Package | Description |
---|---|
com.github.javaparser |
Modifier and Type | Method and Description |
---|---|
static CompilationUnit |
JavaParser.parse(java.io.File file)
Parses the Java code contained in a
File and returns a
CompilationUnit that represents it. |
static CompilationUnit |
JavaParser.parse(java.io.File file,
java.lang.String encoding) |
static CompilationUnit |
JavaParser.parse(java.io.File file,
java.lang.String encoding,
boolean considerComments)
Parses the Java code contained in a
File and returns a
CompilationUnit that represents it. |
static CompilationUnit |
JavaParser.parse(java.io.InputStream in)
Parses the Java code contained in the
InputStream and returns a
CompilationUnit that represents it. |
static CompilationUnit |
JavaParser.parse(java.io.InputStream in,
java.lang.String encoding) |
static CompilationUnit |
JavaParser.parse(java.io.InputStream in,
java.lang.String encoding,
boolean considerComments)
Parses the Java code contained in the
InputStream and returns a
CompilationUnit that represents it. |
static CompilationUnit |
JavaParser.parse(java.io.Reader reader,
boolean considerComments) |
static AnnotationExpr |
JavaParser.parseAnnotation(java.lang.String annotation)
Parses the Java annotation contained in a
String and returns a
AnnotationExpr that represents it. |
static BlockStmt |
JavaParser.parseBlock(java.lang.String blockStatement)
Parses the Java block contained in a
String and returns a
BlockStmt that represents it. |
static BodyDeclaration |
JavaParser.parseBodyDeclaration(java.lang.String body)
Parses the Java body declaration(e.g fields or methods) contained in a
String and returns a BodyDeclaration that represents it. |
static Expression |
JavaParser.parseExpression(java.lang.String expression)
Parses the Java expression contained in a
String and returns a
Expression that represents it. |
static ImportDeclaration |
JavaParser.parseImport(java.lang.String importDeclaration)
Parses the Java import contained in a
String and returns a
ImportDeclaration that represents it. |
static Statement |
JavaParser.parseStatement(java.lang.String statement)
Parses the Java statement contained in a
String and returns a
Statement that represents it. |
Copyright © 2007-2015. All Rights Reserved.