Property class
Property initializer [key]: [value]
, or getter get [key] [value]
, or setter set [key] [value]
.
For getters and setters, value is a FunctionNode, otherwise it is an Expression.
Properties
- enclosingFunction → FunctionNode?
-
Returns the FunctionNode enclosing this node, possibly the node itself, or null if not enclosed in any function.
no setterinherited
- enclosingProgram → Program?
-
Returns the Program node enclosing this node, possibly the node itself, or null if not enclosed in any program.
no setterinherited
- end ↔ int?
-
Source-code offset.
getter/setter pairinherited
- expression → Expression
-
Returns the value as an Expression. Useful for non-getter/setters.
no setter
- filename → String?
-
Retrieves the filename from the enclosing Program. Returns null if the node is orphaned.
no setterinherited
- function → FunctionNode
-
Returns the value as a FunctionNode. Useful for getters/setters.
no setter
- hashCode → int
-
The hash code for this object.
no setterinherited
- isAccessor → bool
-
no setter
- isGetter → bool
-
no setter
- isInit → bool
-
no setter
- isSetter → bool
-
no setter
- key ↔ Node
-
Literal or Name indicating the name of the property. Use nameString to get the name as a string.
getter/setter pair
- kind ↔ String
-
May be "init", "get", or "set".
getter/setter pair
- line ↔ int?
-
1-based line number.
getter/setter pairinherited
- location → String
-
A string with filename and line number.
no setterinherited
- nameString → String?
-
no setter
- parent ↔ Node?
-
The parent of this node, or null if this is the Program node.
getter/setter pairinherited
- runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
- start ↔ int?
-
Source-code offset.
getter/setter pairinherited
- value ↔ Node
-
A FunctionNode (for getters and setters) or an Expression (for ordinary properties).
getter/setter pair
Methods
-
forEach(
void callback(Node node)) → void -
Visits the immediate children of this node.
override
-
noSuchMethod(
Invocation invocation) → dynamic -
Invoked when a nonexistent method or property is accessed.
inherited
-
toString(
) → String -
A string representation of this object.
override
-
visitBy<
T> (Visitor< T> v) → T -
Calls the relevant
visit
method on the visitor.override -
visitBy1<
T, A> (Visitor1< T, A> v, A arg) → T -
Calls the relevant
visit
method on the visitor.override
Operators
-
operator ==(
Object other) → bool -
The equality operator.
inherited