Class CombinedTypeSolver
java.lang.Object
com.github.javaparser.symbolsolver.resolution.typesolvers.CombinedTypeSolver
- All Implemented Interfaces:
TypeSolver
A container for type solvers. All solving is done by the contained type solvers.
This helps you when an API asks for a single type solver, but you need several.
- Author:
- Federico Tomassetti
-
Nested Class Summary
Modifier and TypeClassDescriptionstatic class
Provides some convenience exception handler implementations -
Field Summary
Fields inherited from interface com.github.javaparser.symbolsolver.model.resolution.TypeSolver
JAVA_LANG_OBJECT
-
Constructor Summary
ConstructorDescriptionCombinedTypeSolver(TypeSolver... elements)
CombinedTypeSolver(Iterable<TypeSolver> elements)
CombinedTypeSolver(Predicate<Exception> exceptionHandler, TypeSolver... elements)
CombinedTypeSolver(Predicate<Exception> exceptionHandler, Iterable<TypeSolver> elements)
-
Method Summary
Modifier and TypeMethodDescriptionvoid
add(TypeSolver typeSolver)
Parent of the this TypeSolver.void
setExceptionHandler(Predicate<Exception> exceptionHandler)
void
setParent(TypeSolver parent)
Set the parent of this TypeSolver.Solve the given type.tryToSolveType(String name)
Try to solve the type with the given name.Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
Methods inherited from interface com.github.javaparser.symbolsolver.model.resolution.TypeSolver
getRoot, getSolvedJavaLangObject, hasType
-
Constructor Details
-
CombinedTypeSolver
-
CombinedTypeSolver
-
CombinedTypeSolver
-
CombinedTypeSolver
- See Also:
exceptionHandler
-
-
Method Details
-
setExceptionHandler
- See Also:
exceptionHandler
-
getParent
Description copied from interface:TypeSolver
Parent of the this TypeSolver. This can return null.- Specified by:
getParent
in interfaceTypeSolver
-
setParent
Description copied from interface:TypeSolver
Set the parent of this TypeSolver.- Specified by:
setParent
in interfaceTypeSolver
-
add
-
tryToSolveType
Description copied from interface:TypeSolver
Try to solve the type with the given name. It always return a SymbolReference which can be solved or unsolved.- Specified by:
tryToSolveType
in interfaceTypeSolver
-
solveType
Description copied from interface:TypeSolver
Solve the given type. Either the type is found and returned or an UnsolvedSymbolException is thrown.- Specified by:
solveType
in interfaceTypeSolver
- Throws:
UnsolvedSymbolException
-