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

Unified Diff: lib/mixins_meta.dart

Issue 2090033002: Make PbMixin constructor public, bump version number to 0.5.2. (Closed) Base URL: https://github.com/dart-lang/dart-protobuf.git@master
Patch Set: Created 4 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | pubspec.yaml » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: lib/mixins_meta.dart
diff --git a/lib/mixins_meta.dart b/lib/mixins_meta.dart
index 9812e9cf7269b38b1f41cc48cbcf10b216a71374..4ffa0dc6de5df61fa8b6a06bc13352e51e04b420 100644
--- a/lib/mixins_meta.dart
+++ b/lib/mixins_meta.dart
@@ -22,7 +22,6 @@ PbMixin findMixin(String name) {
/// Only one mixin can be applied to each message, but that mixin can depend
/// on another mixin, recursively, similar to single inheritance.
class PbMixin {
-
/// The name of the mixin class to import into the .pb.dart file.
final String name;
@@ -36,8 +35,7 @@ class PbMixin {
/// May be null if the mixin doesn't reserve any new names.
final List<String> reservedNames;
- const PbMixin._raw(this.name,
- {this.importFrom, this.parent, this.reservedNames});
+ const PbMixin(this.name, {this.importFrom, this.parent, this.reservedNames});
/// Returns the mixin and its ancestors, in the order they should be applied.
Iterable<PbMixin> findMixinsToApply() {
@@ -62,13 +60,13 @@ class PbMixin {
}
/// The mixins that findMixin() can return.
-const _exportedMixins = const [_pbMapMixin, _pbEventMixin];
+final _exportedMixins = [_pbMapMixin, _pbEventMixin];
-const _pbMapMixin = const PbMixin._raw("PbMapMixin",
+const _pbMapMixin = const PbMixin("PbMapMixin",
importFrom: "package:protobuf/src/protobuf/mixins/map_mixin.dart",
parent: _mapMixin);
-const _pbEventMixin = const PbMixin._raw("PbEventMixin",
+const _pbEventMixin = const PbMixin("PbEventMixin",
importFrom: "package:protobuf/src/protobuf/mixins/event_mixin.dart",
reservedNames: const ["changes", "deliverChanges"]);
@@ -88,6 +86,5 @@ const List<String> _reservedNamesForMap = const [
'values',
];
-const _mapMixin = const PbMixin._raw("MapMixin",
- importFrom: "dart:collection",
- reservedNames: _reservedNamesForMap);
+const _mapMixin = const PbMixin("MapMixin",
+ importFrom: "dart:collection", reservedNames: _reservedNamesForMap);
« no previous file with comments | « no previous file | pubspec.yaml » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698