debugDump method

  1. @override
Map<String, Object?> debugDump({
  1. InspectionCache? cache,
  2. bool expandChildren = true,
})
override

Dumps the python object to the console.

Implementation

@override
Map<String, Object?> debugDump({
  InspectionCache? cache,
  bool expandChildren = true,
}) {
  final int? id = cache?.id(value);
  return <String, Object?>{
    if (id != null) "_id": id,
    if (expandChildren)
      "moduleConnections": moduleConnections
          .map(
            (InspectEntryModuleConnection e) =>
                e.debugDump(cache: cache, expandChildren: id == null),
          )
          .toList(),
    "value": value,
    "type": type.displayName,
    "parentModule": definingModule,
    "doc": inspectModule.getdoc(value),
    if (expandChildren)
      "children": Map<String, Map<String, Object?>>.fromEntries(
        children.map(
          ((String, InspectEntry) e) =>
              MapEntry<String, Map<String, Object?>>(
            e.$1,
            e.$2.debugDump(cache: cache, expandChildren: id == null),
          ),
        ),
      ),
  };
}