OLD | NEW |
1 // This code was auto-generated, is not intended to be edited, and is subject to | 1 // This code was auto-generated, is not intended to be edited, and is subject to |
2 // significant change. Please see the README file for more information. | 2 // significant change. Please see the README file for more information. |
3 library engine.utilities.dart; | 3 library engine.utilities.dart; |
4 import 'java_core.dart'; | 4 import 'java_core.dart'; |
5 /** | 5 /** |
6 * The enumeration `ParameterKind` defines the different kinds of parameters. Th
ere are two | 6 * The enumeration `ParameterKind` defines the different kinds of parameters. Th
ere are two |
7 * basic kinds of parameters: required and optional. Optional parameters are fur
ther divided into | 7 * basic kinds of parameters: required and optional. Optional parameters are fur
ther divided into |
8 * two kinds: positional optional and named optional. | 8 * two kinds: positional optional and named optional. |
9 * | 9 * |
10 * @coverage dart.engine.utilities | 10 * @coverage dart.engine.utilities |
11 */ | 11 */ |
12 class ParameterKind extends Enum<ParameterKind> { | 12 class ParameterKind extends Enum<ParameterKind> { |
13 static final ParameterKind REQUIRED = new ParameterKind('REQUIRED', 0, false); | 13 static final ParameterKind REQUIRED = new ParameterKind('REQUIRED', 0, false); |
14 static final ParameterKind POSITIONAL = new ParameterKind('POSITIONAL', 1, tru
e); | 14 static final ParameterKind POSITIONAL = new ParameterKind('POSITIONAL', 1, tru
e); |
15 static final ParameterKind NAMED = new ParameterKind('NAMED', 2, true); | 15 static final ParameterKind NAMED = new ParameterKind('NAMED', 2, true); |
16 static final List<ParameterKind> values = [REQUIRED, POSITIONAL, NAMED]; | 16 static final List<ParameterKind> values = [REQUIRED, POSITIONAL, NAMED]; |
17 | 17 |
18 /** | 18 /** |
19 * A flag indicating whether this is an optional parameter. | 19 * A flag indicating whether this is an optional parameter. |
20 */ | 20 */ |
21 bool _isOptional2 = false; | 21 bool isOptional = false; |
22 | 22 |
23 /** | 23 /** |
24 * Initialize a newly created kind with the given state. | 24 * Initialize a newly created kind with the given state. |
25 * | 25 * |
26 * @param isOptional `true` if this is an optional parameter | 26 * @param isOptional `true` if this is an optional parameter |
27 */ | 27 */ |
28 ParameterKind(String name, int ordinal, bool isOptional) : super(name, ordinal
) { | 28 ParameterKind(String name, int ordinal, bool isOptional) : super(name, ordinal
) { |
29 this._isOptional2 = isOptional; | 29 this.isOptional = isOptional; |
30 } | 30 } |
31 | |
32 /** | |
33 * Return `true` if this is an optional parameter. | |
34 * | |
35 * @return `true` if this is an optional parameter | |
36 */ | |
37 bool get isOptional => _isOptional2; | |
38 } | 31 } |
OLD | NEW |