OLD | NEW |
1 // Copyright (c) 2014, the Dart project authors. Please see the AUTHORS file | 1 // Copyright (c) 2014, the Dart project authors. Please see the AUTHORS file |
2 // for details. All rights reserved. Use of this source code is governed by a | 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. | 3 // BSD-style license that can be found in the LICENSE file. |
4 | 4 |
5 /// Static implementation of smoke services using code-generated data. | 5 /// Static implementation of smoke services using code-generated data. |
6 library smoke.static; | 6 library smoke.static; |
7 | 7 |
8 import 'dart:math' as math; | 8 import 'dart:math' as math; |
9 | 9 |
10 import 'package:logging/logging.dart'; | |
11 import 'package:smoke/smoke.dart'; | 10 import 'package:smoke/smoke.dart'; |
12 | 11 |
13 import 'src/common.dart'; | 12 import 'src/common.dart'; |
14 | 13 |
15 typedef T Getter<T>(object); | 14 typedef T Getter<T>(object); |
16 typedef void Setter<T>(object, value); | 15 typedef void Setter<T>(object, value); |
17 | 16 |
18 class StaticConfiguration { | 17 class StaticConfiguration { |
19 /// Maps symbol to a function that reads that symbol of an object. For | 18 /// Maps symbol to a function that reads that symbol of an object. For |
20 /// instance, `#i: (o) => o.i`. | 19 /// instance, `#i: (o) => o.i`. |
(...skipping 262 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
283 | 282 |
284 /// Exception thrown when trynig to access something that should be there, but | 283 /// Exception thrown when trynig to access something that should be there, but |
285 /// the code generator didn't include it. | 284 /// the code generator didn't include it. |
286 class MissingCodeException implements Exception { | 285 class MissingCodeException implements Exception { |
287 final String description; | 286 final String description; |
288 MissingCodeException(this.description); | 287 MissingCodeException(this.description); |
289 | 288 |
290 String toString() => 'Missing $description. ' | 289 String toString() => 'Missing $description. ' |
291 'Code generation for the smoke package seems incomplete.'; | 290 'Code generation for the smoke package seems incomplete.'; |
292 } | 291 } |
OLD | NEW |