OLD | NEW |
1 // Copyright (c) 2012, the Dart project authors. Please see the AUTHORS file | 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 | 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 part of protobuf; | 5 part of protobuf; |
6 | 6 |
7 /** | 7 /** |
8 * An object representing an extension field. | 8 * An object representing an extension field. |
9 */ | 9 */ |
10 class Extension extends FieldInfo { | 10 class Extension extends FieldInfo { |
11 | 11 |
12 final String extendee; | 12 final String extendee; |
13 | 13 |
14 Extension(this.extendee, String name, int tagNumber, int fieldType, | 14 Extension(this.extendee, String name, int tagNumber, int fieldType, |
15 [MakeDefaultFunc makeDefault, | 15 [dynamic defaultOrMaker, |
16 CreateBuilderFunc subBuilder, | 16 CreateBuilderFunc subBuilder, |
17 ValueOfFunc valueOf]) : | 17 ValueOfFunc valueOf]) : |
18 super(name, tagNumber, fieldType, makeDefault, subBuilder, valueOf); | 18 super(name, tagNumber, fieldType, defaultOrMaker, subBuilder, valueOf); |
19 | 19 |
20 int get hashCode => extendee.hashCode * 31 + tagNumber; | 20 int get hashCode => extendee.hashCode * 31 + tagNumber; |
21 | 21 |
22 bool operator ==(other) { | 22 bool operator ==(other) { |
23 if (other is! Extension) return false; | 23 if (other is! Extension) return false; |
24 | 24 |
25 Extension o = other; | 25 Extension o = other; |
26 return extendee == o.extendee && tagNumber == o.tagNumber; | 26 return extendee == o.extendee && tagNumber == o.tagNumber; |
27 } | 27 } |
28 } | 28 } |
29 | |
OLD | NEW |