Class AbstractJavaParserContext<N extends Node>
- java.lang.Object
-
- com.github.javaparser.symbolsolver.javaparsermodel.contexts.AbstractJavaParserContext<N>
-
- All Implemented Interfaces:
Context
- Direct Known Subclasses:
AbstractMethodLikeDeclarationContext,AnnotationDeclarationContext,AnonymousClassDeclarationContext,BlockStmtContext,CatchClauseContext,ClassOrInterfaceDeclarationContext,CompilationUnitContext,EnumDeclarationContext,FieldAccessContext,ForEachStatementContext,ForStatementContext,LambdaExprContext,MethodCallExprContext,MethodReferenceExprContext,ObjectCreationContext,StatementContext,SwitchEntryContext,TryWithResourceContext,VariableDeclarationExprContext,VariableDeclaratorContext
public abstract class AbstractJavaParserContext<N extends Node> extends Object implements Context
- Author:
- Federico Tomassetti
-
-
Field Summary
Fields Modifier and Type Field Description protected TypeSolvertypeSolverprotected NwrappedNode
-
Constructor Summary
Constructors Constructor Description AbstractJavaParserContext(N wrappedNode, TypeSolver typeSolver)
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description booleanequals(Object o)protected Collection<ResolvedReferenceTypeDeclaration>findTypeDeclarations(Optional<Expression> optScope)ContextgetParent()NgetWrappedNode()inthashCode()Optional<ResolvedType>solveGenericType(String name)static SymbolReference<ResolvedValueDeclaration>solveWith(SymbolDeclarator symbolDeclarator, String name)protected Optional<Value>solveWithAsValue(SymbolDeclarator symbolDeclarator, String name)-
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, toString, wait, wait, wait
-
Methods inherited from interface com.github.javaparser.symbolsolver.core.resolution.Context
fieldDeclarationInScope, fieldsExposedToChild, localVariableDeclarationInScope, localVariablesExposedToChild, parameterDeclarationInScope, parametersExposedToChild, solveConstructor, solveMethod, solveMethodAsUsage, solveSymbol, solveSymbolAsValue, solveType
-
-
-
-
Field Detail
-
typeSolver
protected TypeSolver typeSolver
-
-
Constructor Detail
-
AbstractJavaParserContext
public AbstractJavaParserContext(N wrappedNode, TypeSolver typeSolver)
-
-
Method Detail
-
solveWith
public static SymbolReference<ResolvedValueDeclaration> solveWith(SymbolDeclarator symbolDeclarator, String name)
-
solveGenericType
public Optional<ResolvedType> solveGenericType(String name)
- Specified by:
solveGenericTypein interfaceContext
-
solveWithAsValue
protected Optional<Value> solveWithAsValue(SymbolDeclarator symbolDeclarator, String name)
-
findTypeDeclarations
protected Collection<ResolvedReferenceTypeDeclaration> findTypeDeclarations(Optional<Expression> optScope)
-
getWrappedNode
public N getWrappedNode()
-
-