Package | Description |
---|---|
com.github.javaparser | |
com.github.javaparser.ast | |
com.github.javaparser.utils | |
com.github.javaparser.version |
Modifier and Type | Method and Description |
---|---|
ParseResult<CompilationUnit> |
JavaParser.parse(File file)
|
ParseResult<CompilationUnit> |
JavaParser.parse(File file,
Charset encoding)
Deprecated.
set the encoding in the
ParserConfiguration |
ParseResult<CompilationUnit> |
JavaParser.parse(InputStream in)
|
ParseResult<CompilationUnit> |
JavaParser.parse(InputStream in,
Charset encoding)
Parses the Java code contained in the
InputStream and returns a
CompilationUnit that represents it. |
<N extends Node> |
JavaParser.parse(ParseStart<N> start,
Provider provider)
Parses source code.
|
ParseResult<CompilationUnit> |
JavaParser.parse(Path path)
Parses the Java code contained in a file and returns a
CompilationUnit that represents it. |
ParseResult<CompilationUnit> |
JavaParser.parse(Path path,
Charset encoding)
Deprecated.
set the encoding in the
ParserConfiguration |
ParseResult<CompilationUnit> |
JavaParser.parse(Reader reader)
Parses Java code from a Reader and returns a
CompilationUnit that represents it. |
ParseResult<CompilationUnit> |
JavaParser.parse(String code)
Parses the Java code contained in code and returns a
CompilationUnit that represents it. |
ParseResult<AnnotationExpr> |
JavaParser.parseAnnotation(String annotation)
Parses the Java annotation contained in a
String and returns a
AnnotationExpr that represents it. |
ParseResult<BodyDeclaration<?>> |
JavaParser.parseAnnotationBodyDeclaration(String body)
Parses the Java annotation body declaration(e.g fields or methods) contained in a
String and returns a BodyDeclaration that represents it. |
ParseResult<BlockStmt> |
JavaParser.parseBlock(String blockStatement)
|
<T extends BodyDeclaration<?>> |
JavaParser.parseBodyDeclaration(String body)
Parses a Java class or interface body declaration(e.g fields or methods) and returns a
BodyDeclaration that represents it. |
ParseResult<ClassOrInterfaceType> |
JavaParser.parseClassOrInterfaceType(String type)
Parses a Java class or interface type name and returns a
ClassOrInterfaceType that represents it. |
ParseResult<ExplicitConstructorInvocationStmt> |
JavaParser.parseExplicitConstructorInvocationStmt(String statement)
Parses the this(...) and super(...) statements that may occur at the start of a constructor.
|
<T extends Expression> |
JavaParser.parseExpression(String expression)
Parses the Java expression contained in a
String and returns a
Expression that represents it. |
ParseResult<ImportDeclaration> |
JavaParser.parseImport(String importDeclaration)
Parses the Java import contained in a
String and returns a
ImportDeclaration that represents it. |
ParseResult<ModuleDeclaration> |
JavaParser.parseModuleDeclaration(String moduleDeclaration)
Parses a module declaration and returns it as a ModuleDeclaration.
|
ParseResult<ModuleDirective> |
JavaParser.parseModuleDirective(String moduleDirective)
Parses a module directive and returns it as a ModuleDirective.
|
ParseResult<Name> |
JavaParser.parseName(String qualifiedName)
Parses a qualified name (one that can have "."s in it) and returns it as a Name.
|
ParseResult<PackageDeclaration> |
JavaParser.parsePackageDeclaration(String packageDeclaration)
Parses a package declaration and returns it as a PackageDeclaration.
|
ParseResult<Parameter> |
JavaParser.parseParameter(String parameter)
Parses a single parameter (a type and a name) and returns it as a Parameter.
|
ParseResult<CompilationUnit> |
JavaParser.parseResource(ClassLoader classLoader,
String path,
Charset encoding)
Deprecated.
set the encoding in the
ParserConfiguration |
ParseResult<CompilationUnit> |
JavaParser.parseResource(String path)
Parses the Java code contained in a resource and returns a
CompilationUnit that represents it. |
ParseResult<CompilationUnit> |
JavaParser.parseResource(String path,
Charset encoding)
Deprecated.
set the encoding in the
ParserConfiguration |
ParseResult<SimpleName> |
JavaParser.parseSimpleName(String name)
Parses a simple name (one that can NOT have "."s in it) and returns it as a SimpleName.
|
ParseResult<Statement> |
JavaParser.parseStatement(String statement)
|
ParseResult<Type> |
JavaParser.parseType(String type)
Parses a Java type name and returns a
Type that represents it. |
ParseResult<TypeDeclaration<?>> |
JavaParser.parseTypeDeclaration(String typeDeclaration)
Parses a type declaration and returns it as a TypeDeclaration.
|
ParseResult<TypeParameter> |
JavaParser.parseTypeParameter(String typeParameter)
Parses a type parameter and returns it as a TypeParameter
|
ParseResult<VariableDeclarationExpr> |
JavaParser.parseVariableDeclarationExpr(String declaration)
Parses a variable declaration expression and returns a
VariableDeclarationExpr
that represents it. |
Modifier and Type | Method and Description |
---|---|
void |
ParseResult.PostProcessor.process(ParseResult<? extends Node> result,
ParserConfiguration configuration) |
Modifier and Type | Method and Description |
---|---|
ParseResult<CompilationUnit> |
CompilationUnit.Storage.reparse(JavaParser javaParser) |
Modifier and Type | Method and Description |
---|---|
ParseResult<CompilationUnit> |
SourceRoot.tryToParse(String startPackage,
String filename)
Tries to parse a .java files under the source root and returns the ParseResult.
|
ParseResult<CompilationUnit> |
SourceRoot.tryToParse(String startPackage,
String filename,
ParserConfiguration configuration)
Tries to parse a .java files under the source root and returns the ParseResult.
|
Modifier and Type | Method and Description |
---|---|
List<ParseResult<CompilationUnit>> |
SourceRoot.getCache()
The Java files that have been parsed by this source root object, or have been added manually.
|
List<Pair<Path,ParseResult<CompilationUnit>>> |
SourceZip.parse()
Tries to parse all '.java' files in the ZIP located at this SourceZip's path and returns the parse
results in a list.
|
List<ParseResult<CompilationUnit>> |
SourceRoot.tryToParse()
Tries to parse all .java files under the source root recursively, and returns all files ever parsed with this
source root.
|
List<ParseResult<CompilationUnit>> |
SourceRoot.tryToParse(String startPackage)
Tries to parse all .java files in a package recursively, and returns all files ever parsed with this source root.
|
List<ParseResult<CompilationUnit>> |
SourceRoot.tryToParseParallelized()
Tries to parse all .java files under the source root recursively using multiple threads, and returns all files
ever parsed with this source root.
|
List<ParseResult<CompilationUnit>> |
SourceRoot.tryToParseParallelized(String startPackage)
Tries to parse all .java files in a package recursively using multiple threads, and returns all files ever parsed
with this source root.
|
Modifier and Type | Method and Description |
---|---|
void |
SourceZip.Callback.process(Path relativeZipEntryPath,
ParseResult<CompilationUnit> result)
Process the given parse result.
|
SourceRoot.Callback.Result |
SourceRoot.Callback.process(Path localPath,
Path absolutePath,
ParseResult<CompilationUnit> result) |
Modifier and Type | Method and Description |
---|---|
void |
PostProcessors.process(ParseResult<? extends Node> result,
ParserConfiguration configuration) |
Copyright © 2007–2019. All rights reserved.