public class JavaSymbolSolver extends Object implements com.github.javaparser.resolution.SymbolResolver
An instance of this class should be created once and then injected in all the CompilationUnit for which we
want to enable symbol resolution. To do so the method inject can be used, or you can use
ParserConfiguration.setSymbolResolver(SymbolResolver) and the parser will do the
injection for you.
| Constructor and Description |
|---|
JavaSymbolSolver(TypeSolver typeSolver) |
| Modifier and Type | Method and Description |
|---|---|
com.github.javaparser.resolution.types.ResolvedType |
calculateType(com.github.javaparser.ast.expr.Expression expression) |
void |
inject(com.github.javaparser.ast.CompilationUnit destination)
Register this SymbolResolver into a CompilationUnit, so that symbol resolution becomes available to
all nodes part of the CompilationUnit.
|
<T> T |
resolveDeclaration(com.github.javaparser.ast.Node node,
Class<T> resultClass) |
<T> T |
toResolvedType(com.github.javaparser.ast.type.Type javaparserType,
Class<T> resultClass) |
public JavaSymbolSolver(TypeSolver typeSolver)
public void inject(com.github.javaparser.ast.CompilationUnit destination)
public <T> T resolveDeclaration(com.github.javaparser.ast.Node node,
Class<T> resultClass)
resolveDeclaration in interface com.github.javaparser.resolution.SymbolResolverpublic <T> T toResolvedType(com.github.javaparser.ast.type.Type javaparserType,
Class<T> resultClass)
toResolvedType in interface com.github.javaparser.resolution.SymbolResolverpublic com.github.javaparser.resolution.types.ResolvedType calculateType(com.github.javaparser.ast.expr.Expression expression)
calculateType in interface com.github.javaparser.resolution.SymbolResolverCopyright © 2007–2019. All rights reserved.