Class MemoryTypeSolver
- java.lang.Object
-
- com.github.javaparser.symbolsolver.resolution.typesolvers.MemoryTypeSolver
-
- All Implemented Interfaces:
TypeSolver
public class MemoryTypeSolver extends Object implements TypeSolver
A TypeSolver which only consider the TypeDeclarations provided to it.- Author:
- Federico Tomassetti
-
-
Field Summary
-
Fields inherited from interface com.github.javaparser.resolution.TypeSolver
JAVA_LANG_OBJECT
-
-
Constructor Summary
Constructors Constructor Description MemoryTypeSolver()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description voidaddDeclaration(String name, ResolvedReferenceTypeDeclaration typeDeclaration)booleanequals(Object o)TypeSolvergetParent()Parent of the this TypeSolver.inthashCode()voidsetParent(TypeSolver parent)Set the parent of this TypeSolver.StringtoString()SymbolReference<ResolvedReferenceTypeDeclaration>tryToSolveType(String name)Try to solve the type with the given name.-
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
-
Methods inherited from interface com.github.javaparser.resolution.TypeSolver
getRoot, getSolvedJavaLangObject, hasType, solveType
-
-
-
-
Method Detail
-
getParent
public TypeSolver getParent()
Description copied from interface:TypeSolverParent of the this TypeSolver. This can return null.- Specified by:
getParentin interfaceTypeSolver
-
setParent
public void setParent(TypeSolver parent)
Description copied from interface:TypeSolverSet the parent of this TypeSolver.- Specified by:
setParentin interfaceTypeSolver
-
addDeclaration
public void addDeclaration(String name, ResolvedReferenceTypeDeclaration typeDeclaration)
-
tryToSolveType
public SymbolReference<ResolvedReferenceTypeDeclaration> tryToSolveType(String name)
Description copied from interface:TypeSolverTry to solve the type with the given name. It always return a SymbolReference which can be solved or unsolved.- Specified by:
tryToSolveTypein interfaceTypeSolver
-
-