| 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 /** | 5 /** |
| 6 * Base functionality which code generated summary classes are built upon. | 6 * Base functionality which code generated summary classes are built upon. |
| 7 */ | 7 */ |
| 8 library analyzer.src.summary.base; | 8 library analyzer.src.summary.base; |
| 9 | 9 |
| 10 /** | 10 /** |
| 11 * Annotation used in the summary IDL to indicate the id of a field. The set |
| 12 * of ids used by a class must cover the contiguous range from 0 to N-1, where |
| 13 * N is the number of fields. |
| 14 * |
| 15 * In order to preserve forwards and backwards compatibility, id numbers must |
| 16 * be stable between releases. So when new fields are added they should take |
| 17 * the next available id without renumbering other fields. |
| 18 */ |
| 19 class Id { |
| 20 final int value; |
| 21 |
| 22 const Id(this.value); |
| 23 } |
| 24 |
| 25 /** |
| 11 * Instances of this class represent data that has been read from a summary. | 26 * Instances of this class represent data that has been read from a summary. |
| 12 */ | 27 */ |
| 13 abstract class SummaryClass { | 28 abstract class SummaryClass { |
| 14 /** | 29 /** |
| 15 * Translate the data in this class into a map whose keys are the names of | 30 * Translate the data in this class into a map whose keys are the names of |
| 16 * fields and whose values are the data stored in those fields. | 31 * fields and whose values are the data stored in those fields. |
| 17 * | 32 * |
| 18 * Intended for testing and debugging only. | 33 * Intended for testing and debugging only. |
| 19 */ | 34 */ |
| 20 Map<String, Object> toMap(); | 35 Map<String, Object> toMap(); |
| 21 } | 36 } |
| OLD | NEW |