Class SymbolSolver
- java.lang.Object
-
- com.github.javaparser.symbolsolver.resolution.SymbolSolver
-
-
Constructor Summary
Constructors Constructor Description SymbolSolver(TypeSolver typeSolver)
-
Method Summary
-
-
-
Constructor Detail
-
SymbolSolver
public SymbolSolver(TypeSolver typeSolver)
-
-
Method Detail
-
solveSymbol
public SymbolReference<? extends ResolvedValueDeclaration> solveSymbol(String name, Context context)
- Specified by:
solveSymbol
in interfaceSolver
-
solveSymbol
public SymbolReference<? extends ResolvedValueDeclaration> solveSymbol(String name, Node node)
- Specified by:
solveSymbol
in interfaceSolver
-
solveSymbolAsValue
public Optional<Value> solveSymbolAsValue(String name, Context context)
- Specified by:
solveSymbolAsValue
in interfaceSolver
-
solveSymbolAsValue
public Optional<Value> solveSymbolAsValue(String name, Node node)
- Specified by:
solveSymbolAsValue
in interfaceSolver
-
solveType
public SymbolReference<? extends ResolvedTypeDeclaration> solveType(String name, Context context)
-
solveType
public SymbolReference<? extends ResolvedTypeDeclaration> solveType(String name, Node node)
-
solveMethod
public MethodUsage solveMethod(String methodName, List<ResolvedType> argumentsTypes, Context context)
- Specified by:
solveMethod
in interfaceSolver
-
solveMethod
public MethodUsage solveMethod(String methodName, List<ResolvedType> argumentsTypes, Node node)
- Specified by:
solveMethod
in interfaceSolver
-
solveType
public ResolvedTypeDeclaration solveType(Type type)
-
solveTypeUsage
public ResolvedType solveTypeUsage(String name, Context context)
- Specified by:
solveTypeUsage
in interfaceSolver
-
solveSymbolInType
public SymbolReference<? extends ResolvedValueDeclaration> solveSymbolInType(ResolvedTypeDeclaration typeDeclaration, String name)
Solve any possible visible symbols including: fields, internal types, type variables, the type itself or its containers.It should contain its own private fields but not inherited private fields.
- Specified by:
solveSymbolInType
in interfaceSolver
-
solveTypeInType
@Deprecated public SymbolReference<ResolvedTypeDeclaration> solveTypeInType(ResolvedTypeDeclaration typeDeclaration, String name)
Deprecated.Similarly to solveType this should eventually disappear as the symbol resolution logic should be more general and do not be specific to JavaParser classes like in this case.Try to solve a symbol just in the declaration, it does not delegate to the container.- Specified by:
solveTypeInType
in interfaceSolver
-
classToResolvedType
public ResolvedType classToResolvedType(Class<?> clazz)
Convert aClass
into the correspondingResolvedType
.- Specified by:
classToResolvedType
in interfaceSolver
- Parameters:
clazz
- The class to be converted.- Returns:
- The class resolved.
-
-