Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(169)

Side by Side Diff: lib/protobuf/runtime/Extension.dart

Issue 10595002: Protocol Buffer runtime library and 'protoc' plugin (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Work around http://code.google.com/p/dart/issues/detail?id=3806 Created 8 years, 6 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
OLDNEW
(Empty)
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
3 // BSD-style license that can be found in the LICENSE file.
4
5 /**
6 * An object representing an extension field.
7 */
8 class Extension extends FieldInfo {
9
10 final String extendee;
11
12 Extension(String this.extendee, String name, int tagNumber, int fieldType,
13 [MakeDefaultFunc makeDefault, CreateBuilderFunc subBuilder = null,
14 ValueOfFunc valueOf = null]) :
15 super(name, tagNumber, fieldType, makeDefault, subBuilder, valueOf);
16
17 int hashCode() => extendee.hashCode() * 31 + tagNumber;
18
19 bool operator ==(Extension o) {
20 if (o is! Extension) {
21 return false;
22 }
23 return extendee == o.extendee && tagNumber == o.tagNumber;
24 }
25 }
26
OLDNEW
« no previous file with comments | « lib/protobuf/runtime/DynamicGeneratedMessage.dart ('k') | lib/protobuf/runtime/ExtensionRegistry.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698