public class JavaParserTypeSolver extends Object implements TypeSolver
JAVA_LANG_OBJECT| Constructor and Description |
|---|
JavaParserTypeSolver(File srcDir) |
JavaParserTypeSolver(File srcDir,
ParserConfiguration parserConfiguration) |
JavaParserTypeSolver(Path srcDir) |
JavaParserTypeSolver(Path srcDir,
JavaParser javaParser,
Cache<Path,Optional<CompilationUnit>> parsedFilesCache,
Cache<Path,List<CompilationUnit>> parsedDirectoriesCache,
Cache<String,SymbolReference<ResolvedReferenceTypeDeclaration>> foundTypesCache)
Create a
JavaParserTypeSolver with a custom cache system. |
JavaParserTypeSolver(Path srcDir,
ParserConfiguration parserConfiguration) |
JavaParserTypeSolver(Path srcDir,
ParserConfiguration parserConfiguration,
long cacheSizeLimit) |
JavaParserTypeSolver(String srcDir) |
JavaParserTypeSolver(String srcDir,
ParserConfiguration parserConfiguration) |
| Modifier and Type | Method and Description |
|---|---|
TypeSolver |
getParent() |
void |
setParent(TypeSolver parent) |
String |
toString() |
SymbolReference<ResolvedReferenceTypeDeclaration> |
tryToSolveType(String name) |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, waitgetRoot, getSolvedJavaLangObject, hasType, solveTypepublic JavaParserTypeSolver(File srcDir)
public JavaParserTypeSolver(String srcDir)
public JavaParserTypeSolver(Path srcDir)
public JavaParserTypeSolver(File srcDir, ParserConfiguration parserConfiguration)
public JavaParserTypeSolver(String srcDir, ParserConfiguration parserConfiguration)
public JavaParserTypeSolver(Path srcDir, ParserConfiguration parserConfiguration)
public JavaParserTypeSolver(Path srcDir, ParserConfiguration parserConfiguration, long cacheSizeLimit)
srcDir - is the source code directory for the type solver.parserConfiguration - is the configuration the solver should use when inspecting source code files.cacheSizeLimit - is an optional size limit to the internal caches used by this solver.
Be advised that setting the size too low might lead to noticeable performance degradation.
However, using a size limit is advised when solving symbols in large code sources. In such cases, internal caches might consume large amounts of heap space.public JavaParserTypeSolver(Path srcDir, JavaParser javaParser, Cache<Path,Optional<CompilationUnit>> parsedFilesCache, Cache<Path,List<CompilationUnit>> parsedDirectoriesCache, Cache<String,SymbolReference<ResolvedReferenceTypeDeclaration>> foundTypesCache)
JavaParserTypeSolver with a custom cache system.srcDir - The source code directory for the type solver.javaParser - The JavaParser to be used when parsing .java files.parsedFilesCache - The cache to be used to store CompilationUnit that is associated with
a file.parsedDirectoriesCache - The cache to store the list of CompilationUnit in a given directory.foundTypesCache - The cache that associated a qualified name to its SymbolReference.public TypeSolver getParent()
getParent in interface TypeSolverpublic void setParent(TypeSolver parent)
setParent in interface TypeSolverpublic SymbolReference<ResolvedReferenceTypeDeclaration> tryToSolveType(String name)
tryToSolveType in interface TypeSolverCopyright © 2007–2024. All rights reserved.