Interface TypeSolver


  • public interface TypeSolver
    An element able to find TypeDeclaration from their name. TypeSolvers are organized in hierarchies.
    Author:
    Federico Tomassetti
    • Method Detail

      • getRoot

        default TypeSolver getRoot()
        Get the root of the hierarchy of type solver.
      • getParent

        TypeSolver getParent()
        Parent of the this TypeSolver. This can return null.
      • setParent

        void setParent​(TypeSolver parent)
        Set the parent of this TypeSolver.
      • tryToSolveType

        SymbolReference<com.github.javaparser.resolution.declarations.ResolvedReferenceTypeDeclaration> tryToSolveType​(String name)
        Try to solve the type with the given name. It always return a SymbolReference which can be solved or unsolved.
      • solveType

        default com.github.javaparser.resolution.declarations.ResolvedReferenceTypeDeclaration solveType​(String name)
                                                                                                  throws com.github.javaparser.resolution.UnsolvedSymbolException
        Solve the given type. Either the type is found and returned or an UnsolvedSymbolException is thrown.
        Throws:
        com.github.javaparser.resolution.UnsolvedSymbolException
      • hasType

        default boolean hasType​(String name)