@@ -1112,6 +1112,7 @@ class Library extends ModelElement {
1112
1112
.where ((element) => element is ClassElement && ! element.isEnum));
1113
1113
1114
1114
_classes = types.where (isPublic).map ((e) {
1115
+ if (e.name == 'ExportedClass' ) _getOriginalPublicContainingLibrary (e);
1115
1116
if (e.library != this ._library &&
1116
1117
_exportedNamespace.definedNames.values.contains (e) &&
1117
1118
package._libraryElements.contains (e.library)) {
@@ -1124,6 +1125,26 @@ class Library extends ModelElement {
1124
1125
return _classes;
1125
1126
}
1126
1127
1128
+ void _getOriginalPublicContainingLibrary (Element e) {
1129
+ // _library.exportedLibraries.forEach((lib) {
1130
+ // if (lib.publicNamespace.definedNames.isNotEmpty &&
1131
+ // lib.publicNamespace.definedNames.values.contains(e)) {
1132
+ // print("YYYY ${lib.name} has ${e.name}");
1133
+ // }
1134
+ // var ns = new NamespaceBuilder().createExportNamespaceForLibrary(lib);
1135
+ // var ns2 = new NamespaceBuilder().createPublicNamespaceForLibrary(lib);
1136
+ // print("XXX ${lib.name} public namespace: [" +
1137
+ // lib.publicNamespace.definedNames.keys.join(', ') +
1138
+ // "] and export ns [${ns.definedNames.keys.join(', ')}] " +
1139
+ // " and total public namespace is [${ns2.definedNames.keys.join(', ')}]");
1140
+ // });
1141
+ _library.exports.forEach ((export) {
1142
+ print (
1143
+ "XXX ${_library .name } has export ${export .exportedLibrary .name } ${package ._libraryElements .contains (export .exportedLibrary )} with NS "
1144
+ '${new NamespaceBuilder ().createExportNamespaceForDirective (export ).definedNames .keys .join (', ' )}' );
1145
+ });
1146
+ }
1147
+
1127
1148
LibraryElement get _library => (element as LibraryElement );
1128
1149
1129
1150
Class getClassByName (String name) {
0 commit comments