OLD | NEW |
| (Empty) |
1 // Copyright (c) 2015, the Dart project authors. Please see the AUTHORS file | |
2 // for details. All rights reserved. Use of this source code is governed by a | |
3 // BSD-style license that can be found in the LICENSE file. | |
4 part of initialize; | |
5 | |
6 /// Metadata used to label static or top-level methods that are called | |
7 /// automatically when calling static_init.run(). This class is private because | |
8 /// it shouldn't be used directly in annotations, instead use the `initMethod` | |
9 /// singleton below. | |
10 typedef dynamic _ZeroArg(); | |
11 class _InitMethod implements Initializer<_ZeroArg> { | |
12 const _InitMethod(); | |
13 | |
14 @override | |
15 initialize(_ZeroArg method) => method(); | |
16 } | |
17 | |
18 /// We only ever need one instance of the `_InitMethod` class, this is it. | |
19 const initMethod = const _InitMethod(); | |
OLD | NEW |