Interface TypeSolver
- All Known Implementing Classes:
AarTypeSolver, ClassLoaderTypeSolver, CombinedTypeSolver, JarTypeSolver, JavaParserTypeSolver, MemoryTypeSolver, ReflectionTypeSolver
public interface TypeSolver
An element able to find TypeDeclaration from their name.
TypeSolvers are organized in hierarchies.
-
Field Summary
Fields -
Method Summary
Modifier and TypeMethodDescriptionParent of the this TypeSolver.default TypeSolvergetRoot()Get the root of the hierarchy of type solver.default ResolvedReferenceTypeDeclarationdefault ResolvedReferenceTypeDeclarationdefault booleanvoidsetParent(TypeSolver parent) Set the parent of this TypeSolver.default ResolvedReferenceTypeDeclarationSolve the given type.default ResolvedReferenceTypeDeclarationsolveTypeInModule(String qualifiedModuleName, String simpleTypeName) tryToSolveType(String name) Try to solve the type with the given name.tryToSolveTypeInModule(String qualifiedModuleName, String simpleTypeName)
-
Field Details
-
JAVA_LANG_OBJECT
-
JAVA_LANG_RECORD
- See Also:
-
-
Method Details
-
getRoot
Get the root of the hierarchy of type solver. -
getParent
TypeSolver getParent()Parent of the this TypeSolver. This can return null. -
setParent
Set the parent of this TypeSolver. -
tryToSolveType
Try to solve the type with the given name. It always return a SymbolReference which can be solved or unsolved. -
solveType
Solve the given type. Either the type is found and returned or an UnsolvedSymbolException is thrown.- Throws:
UnsolvedSymbolException
-
tryToSolveTypeInModule
SymbolReference<ResolvedReferenceTypeDeclaration> tryToSolveTypeInModule(String qualifiedModuleName, String simpleTypeName) -
solveTypeInModule
default ResolvedReferenceTypeDeclaration solveTypeInModule(String qualifiedModuleName, String simpleTypeName) -
getSolvedJavaLangObject
- Returns:
- A resolved reference to
java.lang.Object - Throws:
UnsolvedSymbolException
-
getSolvedJavaLangRecord
- Returns:
- A resolved reference to
java.lang.Record - Throws:
UnsolvedSymbolException
-
hasType
-