Method class abstract

Implemented types
Annotations
  • @immutable

Constructors

Method([void updates(MethodBuilder)])
factory
Method.returnsVoid([void updates(MethodBuilder)?])
factory

Properties

annotations → BuiltList<Expression>
Annotations as metadata on the node.
no setter
body Code?
Body of the method.
no setter
closure Expression
This method as a closure.
no setter
docs → BuiltList<String>
Dart docs.
no setter
external bool
Whether the method should be prefixed with external.
no setter
genericClosure Expression
This method as a (possibly) generic closure.
no setter
hashCode int
The hash code for this object.
no setterinherited
lambda bool?
Whether this method is a simple lambda expression.
no setter
modifier MethodModifier?
Whether this method is async, async*, or sync*.
no setter
name String?
Name of the method or function.
no setter
optionalParameters → BuiltList<Parameter>
Optional parameters.
no setter
requiredParameters → BuiltList<Parameter>
Required parameters.
no setter
returns Reference?
no setter
runtimeType Type
A representation of the runtime type of the object.
no setterinherited
static bool
Whether this method should be prefixed with static.
no setter
type MethodType?
Whether this is a getter or setter.
no setter
types → BuiltList<Reference>
Generic type parameters.
no setter

Methods

accept<R>(SpecVisitor<R> visitor, [R? context]) → R
override
noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
rebuild(dynamic updates(MethodBuilder)) Method
Rebuilds the instance.
inherited
toBuilder() MethodBuilder
Converts the instance to a builder B.
inherited
toString() String
A string representation of this object.
inherited

Operators

operator ==(Object other) bool
The equality operator.
inherited