public class ObjectCreationContext extends AbstractJavaParserContext<ObjectCreationExpr>
typeSolver, wrappedNode| Constructor and Description |
|---|
ObjectCreationContext(ObjectCreationExpr wrappedNode,
TypeSolver typeSolver) |
| Modifier and Type | Method and Description |
|---|---|
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. solving
x when used as an argument doubleThis(x), or calculation return x * 2;). |
SymbolReference<ResolvedTypeDeclaration> |
solveType(String name,
List<ResolvedType> typeArguments)
Method used to solve a name with an expected list of type arguments.
|
equals, findTypeDeclarations, getParent, getScope, getWrappedNode, hashCode, isQualifiedName, solveSymbolInParentContext, solveWith, solveWithAsValueclone, finalize, getClass, notify, notifyAll, toString, wait, wait, waitfieldDeclarationInScope, fieldsExposedToChild, localVariableDeclarationInScope, localVariablesExposedToChild, negatedPatternExprsExposedFromChildren, parameterDeclarationInScope, parametersExposedToChild, patternExprInScope, patternExprsExposedFromChildren, patternExprsExposedToChild, solveConstructor, solveGenericType, solveGenericTypeInParentContext, solveMethodAsUsage, solveMethodInParentContext, solveSymbolAsValue, solveSymbolAsValueInParentContext, solveType, solveTypeInParentContext, solveTypeInParentContextpublic ObjectCreationContext(ObjectCreationExpr wrappedNode, TypeSolver typeSolver)
public SymbolReference<ResolvedTypeDeclaration> solveType(String name, List<ResolvedType> typeArguments)
ContextContext.solveType(String) by taking the type arguments in consideration.
For example, lets imagine that we have a project containing the following classes:
name - The name to be solved.typeArguments - The list of expected type arguments.public 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 SymbolReference<ResolvedMethodDeclaration> solveMethod(String name, List<ResolvedType> argumentsTypes, boolean staticOnly)
ContextCopyright © 2007–2022. All rights reserved.