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 |
| 5 /** |
| 6 * This file contains a set of concrete classes representing an in-memory |
| 7 * semantic model of the IDL used to code generate summary serialization and |
| 8 * deserialization code. |
| 9 */ |
| 10 library analyzer.tool.summary.idl_model; |
| 11 |
| 12 /** |
| 13 * Information about a single class defined in the IDL. |
| 14 */ |
| 15 class ClassDeclaration { |
| 16 /** |
| 17 * Fields defined in the class. |
| 18 */ |
| 19 final Map<String, FieldType> fields = <String, FieldType>{}; |
| 20 } |
| 21 |
| 22 /** |
| 23 * Information about a single enum defined in the IDL. |
| 24 */ |
| 25 class EnumDeclaration { |
| 26 /** |
| 27 * List of enumerated values. |
| 28 */ |
| 29 final List<String> values = <String>[]; |
| 30 } |
| 31 |
| 32 /** |
| 33 * Information about the type of a class field defined in the IDL. |
| 34 */ |
| 35 class FieldType { |
| 36 /** |
| 37 * Type of the field (e.g. 'int'). |
| 38 */ |
| 39 final String typeName; |
| 40 |
| 41 /** |
| 42 * Indicates whether this field contains a list of the type specified in |
| 43 * [typeName]. |
| 44 */ |
| 45 final bool isList; |
| 46 |
| 47 FieldType(this.typeName, this.isList); |
| 48 } |
| 49 |
| 50 /** |
| 51 * Top level representation of the summary IDL. |
| 52 */ |
| 53 class Idl { |
| 54 /** |
| 55 * Classes defined in the IDL. |
| 56 */ |
| 57 final Map<String, ClassDeclaration> classes = <String, ClassDeclaration>{}; |
| 58 |
| 59 /** |
| 60 * Enums defined in the IDL. |
| 61 */ |
| 62 final Map<String, EnumDeclaration> enums = <String, EnumDeclaration>{}; |
| 63 } |
OLD | NEW |