Index: lib/protobuf/runtime/FieldInfo.dart |
diff --git a/lib/protobuf/runtime/FieldInfo.dart b/lib/protobuf/runtime/FieldInfo.dart |
new file mode 100644 |
index 0000000000000000000000000000000000000000..a000339ed81f6ebfc97796c7ba3e1a5149e793a4 |
--- /dev/null |
+++ b/lib/protobuf/runtime/FieldInfo.dart |
@@ -0,0 +1,23 @@ |
+// Copyright (c) 2012, the Dart project authors. Please see the AUTHORS file |
+// for details. All rights reserved. Use of this source code is governed by a |
+// BSD-style license that can be found in the LICENSE file. |
+ |
+/** |
+ * An object representing a protobuf message field. |
+ */ |
+class FieldInfo { |
+ final String name; |
+ final int tagNumber; |
+ final int type; |
+ final MakeDefaultFunc makeDefault; |
+ final CreateBuilderFunc subBuilder; |
+ final ValueOfFunc valueOf; |
+ |
+ FieldInfo(String this.name, int this.tagNumber, int type, |
+ [MakeDefaultFunc makeDefault, CreateBuilderFunc this.subBuilder = null, |
+ ValueOfFunc this.valueOf = null]) |
+ : this.type = type, this.makeDefault = |
+ makeDefault == null ? Builder._defaultForType(type) : makeDefault; |
+ |
+ String toString() => name; |
+} |