Class SymbolSolver
- java.lang.Object
-
- com.github.javaparser.symbolsolver.resolution.SymbolSolver
-
- All Implemented Interfaces:
com.github.javaparser.resolution.Solver
public class SymbolSolver extends Object implements com.github.javaparser.resolution.Solver
- Author:
- Federico Tomassetti
-
-
Constructor Summary
Constructors Constructor Description SymbolSolver(com.github.javaparser.resolution.TypeSolver typeSolver)
-
Method Summary
All Methods Instance Methods Concrete Methods Deprecated Methods Modifier and Type Method Description com.github.javaparser.resolution.types.ResolvedTypeclassToResolvedType(Class<?> clazz)Convert aClassinto the correspondingResolvedType.com.github.javaparser.resolution.MethodUsagesolveMethod(String methodName, List<com.github.javaparser.resolution.types.ResolvedType> argumentsTypes, com.github.javaparser.ast.Node node)com.github.javaparser.resolution.MethodUsagesolveMethod(String methodName, List<com.github.javaparser.resolution.types.ResolvedType> argumentsTypes, com.github.javaparser.resolution.Context context)com.github.javaparser.resolution.model.SymbolReference<? extends com.github.javaparser.resolution.declarations.ResolvedValueDeclaration>solveSymbol(String name, com.github.javaparser.ast.Node node)com.github.javaparser.resolution.model.SymbolReference<? extends com.github.javaparser.resolution.declarations.ResolvedValueDeclaration>solveSymbol(String name, com.github.javaparser.resolution.Context context)Optional<com.github.javaparser.resolution.model.Value>solveSymbolAsValue(String name, com.github.javaparser.ast.Node node)Optional<com.github.javaparser.resolution.model.Value>solveSymbolAsValue(String name, com.github.javaparser.resolution.Context context)com.github.javaparser.resolution.model.SymbolReference<? extends com.github.javaparser.resolution.declarations.ResolvedValueDeclaration>solveSymbolInType(com.github.javaparser.resolution.declarations.ResolvedTypeDeclaration typeDeclaration, String name)Solve any possible visible symbols including: fields, internal types, type variables, the type itself or its containers.com.github.javaparser.resolution.declarations.ResolvedTypeDeclarationsolveType(com.github.javaparser.ast.type.Type type)com.github.javaparser.resolution.model.SymbolReference<? extends com.github.javaparser.resolution.declarations.ResolvedTypeDeclaration>solveType(String name, com.github.javaparser.ast.Node node)com.github.javaparser.resolution.model.SymbolReference<? extends com.github.javaparser.resolution.declarations.ResolvedTypeDeclaration>solveType(String name, com.github.javaparser.resolution.Context context)com.github.javaparser.resolution.model.SymbolReference<com.github.javaparser.resolution.declarations.ResolvedTypeDeclaration>solveTypeInType(com.github.javaparser.resolution.declarations.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.com.github.javaparser.resolution.types.ResolvedTypesolveTypeUsage(String name, com.github.javaparser.resolution.Context context)
-
-
-
Method Detail
-
solveSymbol
public com.github.javaparser.resolution.model.SymbolReference<? extends com.github.javaparser.resolution.declarations.ResolvedValueDeclaration> solveSymbol(String name, com.github.javaparser.resolution.Context context)
- Specified by:
solveSymbolin interfacecom.github.javaparser.resolution.Solver
-
solveSymbol
public com.github.javaparser.resolution.model.SymbolReference<? extends com.github.javaparser.resolution.declarations.ResolvedValueDeclaration> solveSymbol(String name, com.github.javaparser.ast.Node node)
- Specified by:
solveSymbolin interfacecom.github.javaparser.resolution.Solver
-
solveSymbolAsValue
public Optional<com.github.javaparser.resolution.model.Value> solveSymbolAsValue(String name, com.github.javaparser.resolution.Context context)
- Specified by:
solveSymbolAsValuein interfacecom.github.javaparser.resolution.Solver
-
solveSymbolAsValue
public Optional<com.github.javaparser.resolution.model.Value> solveSymbolAsValue(String name, com.github.javaparser.ast.Node node)
- Specified by:
solveSymbolAsValuein interfacecom.github.javaparser.resolution.Solver
-
solveType
public com.github.javaparser.resolution.model.SymbolReference<? extends com.github.javaparser.resolution.declarations.ResolvedTypeDeclaration> solveType(String name, com.github.javaparser.resolution.Context context)
- Specified by:
solveTypein interfacecom.github.javaparser.resolution.Solver
-
solveType
public com.github.javaparser.resolution.model.SymbolReference<? extends com.github.javaparser.resolution.declarations.ResolvedTypeDeclaration> solveType(String name, com.github.javaparser.ast.Node node)
- Specified by:
solveTypein interfacecom.github.javaparser.resolution.Solver
-
solveMethod
public com.github.javaparser.resolution.MethodUsage solveMethod(String methodName, List<com.github.javaparser.resolution.types.ResolvedType> argumentsTypes, com.github.javaparser.resolution.Context context)
- Specified by:
solveMethodin interfacecom.github.javaparser.resolution.Solver
-
solveMethod
public com.github.javaparser.resolution.MethodUsage solveMethod(String methodName, List<com.github.javaparser.resolution.types.ResolvedType> argumentsTypes, com.github.javaparser.ast.Node node)
- Specified by:
solveMethodin interfacecom.github.javaparser.resolution.Solver
-
solveType
public com.github.javaparser.resolution.declarations.ResolvedTypeDeclaration solveType(com.github.javaparser.ast.type.Type type)
- Specified by:
solveTypein interfacecom.github.javaparser.resolution.Solver
-
solveTypeUsage
public com.github.javaparser.resolution.types.ResolvedType solveTypeUsage(String name, com.github.javaparser.resolution.Context context)
- Specified by:
solveTypeUsagein interfacecom.github.javaparser.resolution.Solver
-
solveSymbolInType
public com.github.javaparser.resolution.model.SymbolReference<? extends com.github.javaparser.resolution.declarations.ResolvedValueDeclaration> solveSymbolInType(com.github.javaparser.resolution.declarations.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:
solveSymbolInTypein interfacecom.github.javaparser.resolution.Solver
-
solveTypeInType
@Deprecated public com.github.javaparser.resolution.model.SymbolReference<com.github.javaparser.resolution.declarations.ResolvedTypeDeclaration> solveTypeInType(com.github.javaparser.resolution.declarations.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:
solveTypeInTypein interfacecom.github.javaparser.resolution.Solver
-
classToResolvedType
public com.github.javaparser.resolution.types.ResolvedType classToResolvedType(Class<?> clazz)
Convert aClassinto the correspondingResolvedType.- Specified by:
classToResolvedTypein interfacecom.github.javaparser.resolution.Solver- Parameters:
clazz- The class to be converted.- Returns:
- The class resolved.
-
-