Class SourceFileInfoExtractor
- java.lang.Object
-
- com.github.javaparser.symbolsolver.SourceFileInfoExtractor
-
public class SourceFileInfoExtractor extends java.lang.Object
Resolves resolvable nodes from one or more source files, and reports the results. It is mainly intended as an example usage of JavaSymbolSolver.
-
-
Field Summary
Fields Modifier and Type Field Description private java.io.PrintStream
err
private int
failures
private java.io.PrintStream
out
private boolean
printFileName
private int
successes
private TypeSolver
typeSolver
private int
unsupported
private boolean
verbose
-
Constructor Summary
Constructors Constructor Description SourceFileInfoExtractor(TypeSolver typeSolver)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description private java.util.List<Node>
collectAllNodes(Node node)
int
getFailures()
int
getSuccesses()
int
getUnsupported()
private int
lineNr(Node node)
void
setErr(java.io.PrintStream err)
void
setOut(java.io.PrintStream out)
void
setPrintFileName(boolean printFileName)
void
setVerbose(boolean verbose)
private void
solve(Node node)
void
solve(java.nio.file.Path path)
private void
solveMethodCalls(Node node)
void
solveMethodCalls(java.nio.file.Path path)
private void
solveTypeDecl(ClassOrInterfaceDeclaration node)
private java.lang.String
toString(MethodCallExpr node)
private java.lang.String
toString(SymbolReference<ResolvedMethodDeclaration> methodDeclarationSymbolReference)
-
-
-
Field Detail
-
typeSolver
private final TypeSolver typeSolver
-
successes
private int successes
-
failures
private int failures
-
unsupported
private int unsupported
-
printFileName
private boolean printFileName
-
out
private java.io.PrintStream out
-
err
private java.io.PrintStream err
-
verbose
private boolean verbose
-
-
Constructor Detail
-
SourceFileInfoExtractor
public SourceFileInfoExtractor(TypeSolver typeSolver)
-
-
Method Detail
-
setVerbose
public void setVerbose(boolean verbose)
-
setPrintFileName
public void setPrintFileName(boolean printFileName)
-
setOut
public void setOut(java.io.PrintStream out)
-
setErr
public void setErr(java.io.PrintStream err)
-
getSuccesses
public int getSuccesses()
-
getUnsupported
public int getUnsupported()
-
getFailures
public int getFailures()
-
solveTypeDecl
private void solveTypeDecl(ClassOrInterfaceDeclaration node)
-
solve
private void solve(Node node)
-
solveMethodCalls
private void solveMethodCalls(Node node)
-
toString
private java.lang.String toString(MethodCallExpr node)
-
toString
private java.lang.String toString(SymbolReference<ResolvedMethodDeclaration> methodDeclarationSymbolReference)
-
solve
public void solve(java.nio.file.Path path) throws java.io.IOException
- Throws:
java.io.IOException
-
solveMethodCalls
public void solveMethodCalls(java.nio.file.Path path) throws java.io.IOException
- Throws:
java.io.IOException
-
lineNr
private int lineNr(Node node)
-
-