public class JavaParserTypeSolver extends Object implements com.github.javaparser.symbolsolver.model.resolution.TypeSolver
| 构造器和说明 |
|---|
JavaParserTypeSolver(File srcDir) |
JavaParserTypeSolver(File srcDir,
com.github.javaparser.ParserConfiguration parserConfiguration) |
JavaParserTypeSolver(Path srcDir) |
JavaParserTypeSolver(Path srcDir,
com.github.javaparser.JavaParser javaParser,
com.github.javaparser.symbolsolver.cache.Cache<Path,Optional<com.github.javaparser.ast.CompilationUnit>> parsedFilesCache,
com.github.javaparser.symbolsolver.cache.Cache<Path,List<com.github.javaparser.ast.CompilationUnit>> parsedDirectoriesCache,
com.github.javaparser.symbolsolver.cache.Cache<String,com.github.javaparser.symbolsolver.model.resolution.SymbolReference<com.github.javaparser.resolution.declarations.ResolvedReferenceTypeDeclaration>> foundTypesCache)
Create a
JavaParserTypeSolver with a custom cache system. |
JavaParserTypeSolver(Path srcDir,
com.github.javaparser.ParserConfiguration parserConfiguration) |
JavaParserTypeSolver(Path srcDir,
com.github.javaparser.ParserConfiguration parserConfiguration,
long cacheSizeLimit) |
JavaParserTypeSolver(String srcDir) |
JavaParserTypeSolver(String srcDir,
com.github.javaparser.ParserConfiguration parserConfiguration) |
| 限定符和类型 | 方法和说明 |
|---|---|
com.github.javaparser.symbolsolver.model.resolution.TypeSolver |
getParent() |
void |
setParent(com.github.javaparser.symbolsolver.model.resolution.TypeSolver parent) |
String |
toString() |
com.github.javaparser.symbolsolver.model.resolution.SymbolReference<com.github.javaparser.resolution.declarations.ResolvedReferenceTypeDeclaration> |
tryToSolveType(String name) |
public JavaParserTypeSolver(File srcDir)
public JavaParserTypeSolver(String srcDir)
public JavaParserTypeSolver(Path srcDir)
public JavaParserTypeSolver(File srcDir, com.github.javaparser.ParserConfiguration parserConfiguration)
public JavaParserTypeSolver(String srcDir, com.github.javaparser.ParserConfiguration parserConfiguration)
public JavaParserTypeSolver(Path srcDir, com.github.javaparser.ParserConfiguration parserConfiguration)
public JavaParserTypeSolver(Path srcDir, com.github.javaparser.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, com.github.javaparser.JavaParser javaParser, com.github.javaparser.symbolsolver.cache.Cache<Path,Optional<com.github.javaparser.ast.CompilationUnit>> parsedFilesCache, com.github.javaparser.symbolsolver.cache.Cache<Path,List<com.github.javaparser.ast.CompilationUnit>> parsedDirectoriesCache, com.github.javaparser.symbolsolver.cache.Cache<String,com.github.javaparser.symbolsolver.model.resolution.SymbolReference<com.github.javaparser.resolution.declarations.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 com.github.javaparser.symbolsolver.model.resolution.TypeSolver getParent()
getParent 在接口中 com.github.javaparser.symbolsolver.model.resolution.TypeSolverpublic void setParent(com.github.javaparser.symbolsolver.model.resolution.TypeSolver parent)
setParent 在接口中 com.github.javaparser.symbolsolver.model.resolution.TypeSolverpublic com.github.javaparser.symbolsolver.model.resolution.SymbolReference<com.github.javaparser.resolution.declarations.ResolvedReferenceTypeDeclaration> tryToSolveType(String name)
tryToSolveType 在接口中 com.github.javaparser.symbolsolver.model.resolution.TypeSolverCopyright © 2022. All rights reserved.