A function shortcut definition, using a lazy specifier and terminated by a semicolon.
Examples:
shared void run() => print("Hello, `` process.arguments.first else "World" ``!"); shared actual Boolean equals(Object that) => that is This;
no subtypes hierarchy
Initializer |
FunctionShortcutDefinition(LIdentifier name, Type|VoidModifier|FunctionModifier|DynamicModifier type, [Parameters+] parameterLists, LazySpecifier definition, TypeParameters? typeParameters = null, TypeConstraint[] typeConstraints = [], Annotations annotations = ...) Parameters:
|
Attributes | |
annotations | shared actual Annotations annotations The annotations on the declaration. Refines Declaration.annotations |
children | shared actual [Annotations, Type|FunctionModifier|DynamicModifier|VoidModifier, LIdentifier, <TypeParameters|Parameters|TypeConstraint|LazySpecifier>*] children The child nodes of this node. |
definition | shared actual LazySpecifier definition The definition of the declaration, if present. |
hash | shared actual Integer hash The hash value of the value, which allows the value to be an element of a hash-based set or key of a hash-based map. Implementations must respect the constraint that:
Therefore, a class which refines In general, Note that when executing on a Java Virtual Machine, the
64-bit Refines Object.hash |
name | shared actual LIdentifier name The name of the declared program element, if present. |
parameterLists | shared actual [Parameters+] parameterLists The parameter lists. A function must have at least one, but may also have several parameter lists. Refines AnyFunction.parameterLists |
type | shared actual Type|VoidModifier|FunctionModifier|DynamicModifier type The type of the function. This can be:
|
typeConstraints | shared actual TypeConstraint[] typeConstraints The type constraints placed upon the function’s type parameters, if any. Refines AnyFunction.typeConstraints |
typeParameters | shared actual TypeParameters? typeParameters The type parameters of the function, if any. Refines AnyFunction.typeParameters |
Inherited Attributes |
Attributes inherited from: AnyFunction |
Attributes inherited from: Declaration |
Attributes inherited from: Node |
Attributes inherited from: Object hash , string |
Attributes inherited from: TypedDeclaration |
Methods | |
copy | shared FunctionShortcutDefinition copy(LIdentifier name = ..., Type|VoidModifier|FunctionModifier|DynamicModifier type = ..., [Parameters+] parameterLists = ..., LazySpecifier definition = ..., TypeParameters? typeParameters = ..., TypeConstraint[] typeConstraints = ..., Annotations annotations = ...) Parameters:
|
equals | shared actual Boolean equals(Object that) Determine if two values are equal. Implementations should respect the constraints that:
Furthermore it is recommended that implementations
ensure that if A class which explicitly refines Note that an implementation of Refines Object.equals |
transform | shared actual Result transform<out Result>(Transformer<Result> transformer) Transform this node with the given If you have a Refines Node.transform |
visit | shared actual void visit(Visitor visitor) Visit this node with the given Refines Node.visit |
Inherited Methods |
Methods inherited from: Node |
Methods inherited from: Object equals |