JavaSymbolSolver

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 setSymbolResolver and the parser will do the injection for you.

Author

Federico Tomassetti

Constructors

Link copied to clipboard
constructor(@NotNull typeSolver: TypeSolver)

Properties

Link copied to clipboard
Sometimes you want the old simple Java name resolution without consideration of any JML annotation.

Functions

Link copied to clipboard
open fun calculateType(expression: Expression): ResolvedType
Link copied to clipboard
open fun inject(destination: CompilationUnit)
Register this SymbolResolver into a CompilationUnit, so that symbol resolution becomes available to all nodes part of the CompilationUnit.
Link copied to clipboard
open fun <T> resolveDeclaration(node: Node, resultClass: Class<T>): T
Link copied to clipboard
open fun <T> resolveDeclarationImpl(node: Node, resultClass: Class<T>): T
Link copied to clipboard
open fun <T> toResolvedType(javaparserType: Type, resultClass: Class<T>): T
Link copied to clipboard