public abstract class AbstractMethodLikeDeclarationContext<T extends Node & NodeWithParameters<T> & NodeWithTypeParameters<T>> extends AbstractJavaParserContext<T>
typeSolver, wrappedNode| Constructor and Description |
|---|
AbstractMethodLikeDeclarationContext(T 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.
|
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, getWrappedNode, hashCode, solveSymbolInParentContext, solveWith, solveWithAsValueclone, finalize, getClass, notify, notifyAll, toString, wait, wait, waitfieldDeclarationInScope, fieldsExposedToChild, localVariableDeclarationInScope, localVariablesExposedToChild, negatedPatternExprsExposedFromChildren, parameterDeclarationInScope, parametersExposedToChild, patternExprInScope, patternExprsExposedFromChildren, patternExprsExposedToChild, solveConstructor, solveGenericTypeInParentContext, solveMethodAsUsage, solveMethodInParentContext, solveSymbolAsValueInParentContext, solveTypeInParentContextpublic AbstractMethodLikeDeclarationContext(T wrappedNode, TypeSolver typeSolver)
public final SymbolReference<? extends ResolvedValueDeclaration> solveSymbol(String name)
Contextx when used as an argument doubleThis(x), or calculation return x * 2;).name - the variable / reference / identifier used.public final Optional<ResolvedType> solveGenericType(String name)
Contextname - For example, solving T within class Foo<T> {} orpublic final Optional<Value> solveSymbolAsValue(String name)
Contextx when used as an argument doubleThis(x), or calculation return x * 2;).name - the variable / reference / identifier used.public final SymbolReference<ResolvedTypeDeclaration> solveType(String name)
Contextname - For example, solving List or java.util.List.public final SymbolReference<ResolvedMethodDeclaration> solveMethod(String name, List<ResolvedType> argumentsTypes, boolean staticOnly)
ContextCopyright © 2007–2020. All rights reserved.