MethodInvocation class

The invocation of either a function or a method. Invocations of functions resulting from evaluating an expression are represented by FunctionExpressionInvocation nodes. Invocations of getters and setters are represented by either PrefixedIdentifier or PropertyAccess nodes.

methodInvocation ::= (Expression '.')? SimpleIdentifier TypeArgumentList? ArgumentList

Clients may not extend, implement or mix-in this class.

Inheritance

Constructors

MethodInvocation()

Properties

argumentList ArgumentList
Return the list of arguments to the method.
read / write, inherited-getter
isCascaded → bool
Return true if this expression is cascaded. If it is, then the target of this expression is not stored locally but is stored in the nearest ancestor that is a CascadeExpression.
read-only
methodName SimpleIdentifier
Return the name of the method being invoked.
read / write
operator Token
Return the operator that separates the target from the method name, or null if there is no target. In an ordinary method invocation this will be [...]
read / write
realTarget Expression
Return the expression used to compute the receiver of the invocation. If this invocation is not part of a cascade expression, then this is the same as target. If this invocation is part of a cascade expression, then the target stored with the cascade expression is returned.
read-only
target Expression
Return the expression producing the object on which the method is defined, or null if there is no target (that is, the target is implicitly this) or if this method invocation is part of a cascade expression. [...]
read / write
typeArguments TypeArgumentList
Return the type arguments to be applied to the method being invoked, or null if no type arguments were provided.
read / write, inherited-getter
beginToken Token
Return the first token included in this node's source range.
read-only, inherited
bestParameterElement ParameterElement
Return the best parameter element information available for this expression. If type propagation was able to find a better parameter element than static analysis, that type will be returned. Otherwise, the result of static analysis will be returned. [...]
read-only, inherited
bestType DartType
Return the best type information available for this expression. If type propagation was able to find a better type than static analysis, that type will be returned. Otherwise, the result of static analysis will be returned. If no type analysis has been performed, then the type 'dynamic' will be returned. [...]
read-only, inherited
childEntities → Iterable<SyntacticEntity>
Return an iterator that can be used to iterate through all the entities (either AST nodes or tokens) that make up the contents of this node, including doc comments but excluding other comments.
read-only, inherited
end → int
Return the offset of the character immediately following the last character of this node's source range. This is equivalent to node.getOffset() + node.getLength(). For a compilation unit this will be equal to the length of the unit's source. For synthetic nodes this will be equivalent to the node's offset (because the length is zero (0) by definition).
read-only, inherited
endToken Token
Return the last token included in this node's source range.
read-only, inherited
function Expression
The expression that identifies the function or method being invoked. For example: [...]
read-only, inherited
hashCode → int
The hash code for this object.
read-only, inherited
isAssignable → bool
Return true if this expression is syntactically valid for the LHS of an AssignmentExpression.
read-only, inherited
isSynthetic → bool
Return true if this node is a synthetic node. A synthetic node is a node that was introduced by the parser in order to recover from an error in the code. Synthetic nodes always have a length of zero (0).
read-only, inherited
length → int
Return the number of characters in the syntactic entity's source range.
read-only, inherited
offset → int
Return the offset from the beginning of the file to the first character in the syntactic entity.
read-only, inherited
parent AstNode
Return this node's parent node, or null if this node is the root of an AST structure. [...]
read-only, inherited
precedence → int
Return the precedence of this expression. The precedence is a positive integer value that defines how the source code is parsed into an AST. For example a * b + c is parsed as (a * b) + c because the precedence of * is greater than the precedence of +. [...]
read-only, inherited
propagatedInvokeType DartType
Return the function type of the invocation based on the propagated type information, or null if the AST structure has not been resolved, or if the invoke could not be resolved. [...]
read / write, inherited
propagatedParameterElement ParameterElement
If this expression is an argument to an invocation, and the AST structure has been resolved, and the function being invoked is known based on propagated type information, and this expression corresponds to one of the parameters of the function being invoked, then return the parameter element representing the parameter to which the value of this expression will be bound. Otherwise, return null. [...]
read-only, inherited
propagatedType DartType
Return the propagated type of this expression, or null if type propagation has not been performed on the AST structure. [...]
read / write, inherited
root AstNode
Return the node at the root of this node's AST structure. Note that this method's performance is linear with respect to the depth of the node in the AST structure (O(depth)).
read-only, inherited
runtimeType → Type
A representation of the runtime type of the object.
read-only, inherited
staticInvokeType DartType
Return the function type of the invocation based on the static type information, or null if the AST structure has not been resolved, or if the invoke could not be resolved. [...]
read / write, inherited
staticParameterElement ParameterElement
If this expression is an argument to an invocation, and the AST structure has been resolved, and the function being invoked is known based on static type information, and this expression corresponds to one of the parameters of the function being invoked, then return the parameter element representing the parameter to which the value of this expression will be bound. Otherwise, return null.
read-only, inherited
staticType DartType
Return the static type of this expression, or null if the AST structure has not been resolved.
read / write, inherited
unParenthesized Expression
If this expression is a parenthesized expression, return the result of unwrapping the expression inside the parentheses. Otherwise, return this expression.
read-only, inherited

Methods

accept<E>(AstVisitor<E> visitor) → E
Use the given visitor to visit this node. Return the value returned by the visitor as a result of visiting this node.
inherited
findPrevious(Token target) Token
Return the token before target or null if it cannot be found.
inherited
getAncestor<E extends AstNode>(Predicate<AstNode> predicate) → E
Return the most immediate ancestor of this node for which the predicate returns true, or null if there is no such ancestor. Note that this node will never be returned.
inherited
getProperty<E>(String name) → E
Return the value of the property with the given name, or null if this node does not have a property with the given name.
inherited
noSuchMethod(Invocation invocation) → dynamic
Invoked when a non-existent method or property is accessed.
inherited
setProperty(String name, Object value) → void
Set the value of the property with the given name to the given value. If the value is null, the property will effectively be removed.
inherited
toSource() → String
Return a textual description of this node in a form approximating valid source. The returned string will not be valid source primarily in the case where the node itself is not well-formed.
inherited
toString() → String
Returns a string representation of this object.
inherited
visitChildren(AstVisitor visitor) → void
Use the given visitor to visit all of the children of this node. The children will be visited in lexical order.
inherited

Operators

operator ==(dynamic other) → bool
The equality operator.
inherited