public class StatementContext<N extends Statement> extends AbstractJavaParserContext<N>
typeSolver, wrappedNode
Constructor and Description |
---|
StatementContext(N wrappedNode,
TypeSolver typeSolver) |
Modifier and Type | Method and Description |
---|---|
List<PatternExpr> |
negatedPatternExprsExposedFromChildren() |
List<PatternExpr> |
patternExprsExposedFromChildren() |
static SymbolReference<? extends ResolvedValueDeclaration> |
solveInBlock(String name,
TypeSolver typeSolver,
Statement stmt) |
static Optional<Value> |
solveInBlockAsValue(String name,
TypeSolver typeSolver,
Statement stmt) |
SymbolReference<ResolvedMethodDeclaration> |
solveMethod(String name,
List<ResolvedType> argumentsTypes,
boolean staticOnly)
We find the method declaration which is the best match for the given name and list of typeParametersValues.
|
SymbolReference<? extends ResolvedValueDeclaration> |
solveSymbol(String name)
Used where a symbol is being used (e.g.
|
Optional<Value> |
solveSymbolAsValue(String name)
Used where a symbol is being used (e.g.
|
protected Optional<Value> |
solveWithAsValue(SymbolDeclarator symbolDeclarator,
String name) |
equals, findTypeDeclarations, getParent, getScope, getWrappedNode, hashCode, isQualifiedName, solveSymbolInParentContext, solveWith
clone, finalize, getClass, notify, notifyAll, toString, wait, wait, wait
fieldDeclarationInScope, fieldsExposedToChild, localVariableDeclarationInScope, localVariablesExposedToChild, parameterDeclarationInScope, parametersExposedToChild, patternExprInScope, patternExprsExposedToChild, solveConstructor, solveGenericType, solveGenericTypeInParentContext, solveMethodAsUsage, solveMethodInParentContext, solveSymbolAsValueInParentContext, solveType, solveTypeInParentContext
public StatementContext(N wrappedNode, TypeSolver typeSolver)
public static SymbolReference<? extends ResolvedValueDeclaration> solveInBlock(String name, TypeSolver typeSolver, Statement stmt)
public static Optional<Value> solveInBlockAsValue(String name, TypeSolver typeSolver, Statement stmt)
public Optional<Value> solveSymbolAsValue(String name)
Context
x
when used as an argument doubleThis(x)
, or calculation return x * 2;
).name
- the variable / reference / identifier used.protected Optional<Value> solveWithAsValue(SymbolDeclarator symbolDeclarator, String name)
solveWithAsValue
in class AbstractJavaParserContext<N extends Statement>
public SymbolReference<? extends ResolvedValueDeclaration> solveSymbol(String name)
Context
x
when used as an argument doubleThis(x)
, or calculation return x * 2;
).name
- the variable / reference / identifier used.public SymbolReference<ResolvedMethodDeclaration> solveMethod(String name, List<ResolvedType> argumentsTypes, boolean staticOnly)
Context
public List<PatternExpr> patternExprsExposedFromChildren()
public List<PatternExpr> negatedPatternExprsExposedFromChildren()
Copyright © 2007–2021. All rights reserved.