public class FieldAccessContext extends AbstractJavaParserContext<FieldAccessExpr>
typeSolver, wrappedNode
Constructor and Description |
---|
FieldAccessContext(FieldAccessExpr wrappedNode,
TypeSolver typeSolver) |
Modifier and Type | Method and Description |
---|---|
SymbolReference<ResolvedValueDeclaration> |
solveField(String name) |
SymbolReference<ResolvedMethodDeclaration> |
solveMethod(String name,
List<ResolvedType> parameterTypes,
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.
|
SymbolReference<ResolvedTypeDeclaration> |
solveType(String name)
Default to being unable to solve any reference in this context, delegating solving to the parent context.
|
equals, findTypeDeclarations, getParent, getScope, getWrappedNode, hashCode, isQualifiedName, solveSymbolInParentContext, solveWith, solveWithAsValue
clone, finalize, getClass, notify, notifyAll, toString, wait, wait, wait
fieldDeclarationInScope, fieldsExposedToChild, localVariableDeclarationInScope, localVariablesExposedToChild, negatedPatternExprsExposedFromChildren, parameterDeclarationInScope, parametersExposedToChild, patternExprInScope, patternExprsExposedFromChildren, patternExprsExposedToChild, solveConstructor, solveGenericType, solveGenericTypeInParentContext, solveMethodAsUsage, solveMethodInParentContext, solveSymbolAsValueInParentContext, solveTypeInParentContext
public FieldAccessContext(FieldAccessExpr wrappedNode, TypeSolver typeSolver)
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<ResolvedTypeDeclaration> solveType(String name)
Context
name
- For example, solving List
or java.util.List
.public SymbolReference<ResolvedMethodDeclaration> solveMethod(String name, List<ResolvedType> parameterTypes, boolean staticOnly)
Context
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.public SymbolReference<ResolvedValueDeclaration> solveField(String name)
Copyright © 2007–2021. All rights reserved.