Class JavaSymbolSolver
java.lang.Object
com.github.javaparser.symbolsolver.JavaSymbolSolver
- All Implemented Interfaces:
SymbolResolver
This implementation of the SymbolResolver wraps the functionality of the library to make them easily usable
from JavaParser nodes.
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.
- Author:
- Federico Tomassetti
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptioncalculateType(Expression expression)
void
inject(CompilationUnit destination)
Register this SymbolResolver into a CompilationUnit, so that symbol resolution becomes available to all nodes part of the CompilationUnit.<T> T
resolveDeclaration(Node node, Class<T> resultClass)
<T> T
toResolvedType(Type javaparserType, Class<T> resultClass)
-
Constructor Details
-
JavaSymbolSolver
-
-
Method Details
-
inject
Register this SymbolResolver into a CompilationUnit, so that symbol resolution becomes available to all nodes part of the CompilationUnit. -
resolveDeclaration
- Specified by:
resolveDeclaration
in interfaceSymbolResolver
-
toResolvedType
- Specified by:
toResolvedType
in interfaceSymbolResolver
-
calculateType
- Specified by:
calculateType
in interfaceSymbolResolver
-