| 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'; | 10 import 'package:logging/logging.dart'; |
| (...skipping 146 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 157 } | 157 } |
| 158 result = (superclass == Object) ? [] : query(superclass, options); | 158 result = (superclass == Object) ? [] : query(superclass, options); |
| 159 } else { | 159 } else { |
| 160 result = []; | 160 result = []; |
| 161 } | 161 } |
| 162 var map = _configuration.declarations[type]; | 162 var map = _configuration.declarations[type]; |
| 163 if (map == null) { | 163 if (map == null) { |
| 164 throw new MissingCodeException('declarations for $type'); | 164 throw new MissingCodeException('declarations for $type'); |
| 165 } | 165 } |
| 166 for (var decl in map.values) { | 166 for (var decl in map.values) { |
| 167 if (!options.includeFields && decl.isField) continue; |
| 167 if (!options.includeProperties && decl.isProperty) continue; | 168 if (!options.includeProperties && decl.isProperty) continue; |
| 168 if (options.excludeFinal && decl.isFinal) continue; | 169 if (options.excludeFinal && decl.isFinal) continue; |
| 169 if (!options.includeMethods && decl.isMethod) continue; | 170 if (!options.includeMethods && decl.isMethod) continue; |
| 170 if (options.withAnnotations != null && | 171 if (options.withAnnotations != null && |
| 171 !matchesAnnotation(decl.annotations, options.withAnnotations)) { | 172 !matchesAnnotation(decl.annotations, options.withAnnotations)) { |
| 172 continue; | 173 continue; |
| 173 } | 174 } |
| 174 result.add(decl); | 175 result.add(decl); |
| 175 } | 176 } |
| 176 return result; | 177 return result; |
| (...skipping 25 matching lines...) Expand all Loading... |
| 202 if (declaration != null) return declaration; | 203 if (declaration != null) return declaration; |
| 203 } | 204 } |
| 204 var parentType = _configuration.parents[type]; | 205 var parentType = _configuration.parents[type]; |
| 205 if (parentType == null) { | 206 if (parentType == null) { |
| 206 throw new MissingCodeException('superclass of "$type"'); | 207 throw new MissingCodeException('superclass of "$type"'); |
| 207 } | 208 } |
| 208 type = parentType; | 209 type = parentType; |
| 209 } | 210 } |
| 210 return null; | 211 return null; |
| 211 } | 212 } |
| OLD | NEW |