public class MethodCallExprContext extends AbstractJavaParserContext<MethodCallExpr>
typeSolver, wrappedNode
Constructor and Description |
---|
MethodCallExprContext(MethodCallExpr wrappedNode,
TypeSolver typeSolver) |
Modifier and Type | Method and Description |
---|---|
Optional<ResolvedType> |
solveGenericType(String name)
Default to no generics available in this context, delegating solving to the parent context.
|
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.
|
Optional<MethodUsage> |
solveMethodAsUsage(String name,
List<ResolvedType> argumentsTypes)
Similar to solveMethod but we return a MethodUsage.
|
Optional<Value> |
solveSymbolAsValue(String name)
Used where a symbol is being used (e.g.
|
String |
toString() |
equals, findTypeDeclarations, getParent, getScope, getWrappedNode, hashCode, isQualifiedName, solveSymbolInParentContext, solveWith, solveWithAsValue
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
fieldDeclarationInScope, fieldsExposedToChild, localVariableDeclarationInScope, localVariablesExposedToChild, negatedPatternExprsExposedFromChildren, parameterDeclarationInScope, parametersExposedToChild, patternExprInScope, patternExprsExposedFromChildren, patternExprsExposedToChild, solveConstructor, solveGenericTypeInParentContext, solveMethodInParentContext, solveSymbol, solveSymbolAsValueInParentContext, solveType, solveTypeInParentContext
public MethodCallExprContext(MethodCallExpr wrappedNode, TypeSolver typeSolver)
public Optional<ResolvedType> solveGenericType(String name)
Context
name
- For example, solving T
within class Foo<T> {}
orpublic Optional<MethodUsage> solveMethodAsUsage(String name, List<ResolvedType> argumentsTypes)
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<ResolvedMethodDeclaration> solveMethod(String name, List<ResolvedType> argumentsTypes, boolean staticOnly)
Context
Copyright © 2007–2021. All rights reserved.