OLD | NEW |
| (Empty) |
1 // Copyright (c) 2012, 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 | |
5 /** | |
6 * This file is read by 'mirrors_test.dart'. | |
7 */ | |
8 | |
9 library mirrors_helper; | |
10 | |
11 typedef E Func<E,F extends Foo>(F f); | |
12 | |
13 main() { | |
14 | |
15 } | |
16 | |
17 /// Singleline doc comment. | |
18 @Metadata(null) | |
19 // Singleline comment 1. | |
20 // Singleline comment 2. | |
21 @Metadata(true) | |
22 @Metadata(false) | |
23 @Metadata(0) | |
24 @Metadata(1.5) | |
25 @Metadata("Foo") | |
26 @Metadata(const ["Foo"]) | |
27 @Metadata(const {'foo':"Foo"}) | |
28 @metadata | |
29 /** Multiline doc comment. */ | |
30 /* Multiline comment. */ class Foo { | |
31 m(@metadata a) {} | |
32 } | |
33 | |
34 | |
35 abstract class Bar<E> { | |
36 | |
37 } | |
38 | |
39 class Baz<E,F extends Foo> implements Bar<E> { | |
40 Baz(); | |
41 const Baz.named(); | |
42 factory Baz.factory() => new Baz<E,F>(); | |
43 | |
44 static method1(e) {} | |
45 void method2(E e, [F f = null]) {} | |
46 Baz<E,F> method3(E func1(F f), Func<E,F> func2) => null; | |
47 | |
48 bool operator==(Object other) => false; | |
49 int operator-() => 0; | |
50 operator$foo() {} | |
51 } | |
52 | |
53 class Boz extends Foo { | |
54 var field1; | |
55 int _field2; | |
56 final String field3 = "field3"; | |
57 | |
58 int get field2 => _field2; | |
59 void set field2(int value) { | |
60 _field2 = value; | |
61 } | |
62 } | |
63 | |
64 class _PrivateClass { | |
65 var _privateField; | |
66 get _privateGetter => _privateField; | |
67 void set _privateSetter(value) => _privateField = value; | |
68 void _privateMethod() {} | |
69 _PrivateClass._privateConstructor(); | |
70 factory _PrivateClass._privateFactoryConstructor() => null; | |
71 } | |
72 | |
73 const metadata = const Metadata(null); | |
74 | |
75 class Metadata { | |
76 final data; | |
77 const Metadata(this.data); | |
78 } | |
OLD | NEW |