registerClassElement method
void
registerClassElement(
- String fullName,
- Element element
)
Implementation
void registerClassElement(String fullName, Element element) async {
if (element is InterfaceElement) {
if (!classNames.containsKey(element)) {
classNames[element] = fullName;
TypeInfo elementType = TypeInfo(this, element.thisType, config);
output.writeLn('//register: ${elementType.uniqueName}');
allTypes[fullName] = elementType;
} else if (fullName != classNames[element]) {
// with new coding standard, module name is not always available (and cen differ from import prefix anyway)
// var path = element.firstFragment.libraryFragment.element.name; // element.declaration.librarySource!.fullName.split('/');
// in case of modules using (but not requiring) other modules, please use ComposeIfModule
//output.writeLn('//$fullName');
//output.writeLn('//${classNames[element]}');
/*
String? realModuleName = path.length > 1 ? path.elementAt(1) : null;
String importModuleName = fullName.split('.').first;
if (realModuleName == importModuleName) {
// replace class info with proper namespace
allTypes[fullName] = allTypes[classNames[element]!]!;
allTypes.remove(classNames[element]!);
classNames[element] = fullName;
}*/
}
}
}