debugPooledClassCount static method

int debugPooledClassCount(
  1. String packageName
)

Diagnostics / test introspection — the number of bridged classes pooled under packageName across all source URIs (0 if not pooled). Lets tests assert that a freshly-provided package's definitions landed in the pool without exposing the internal bundle type.

Implementation

static int debugPooledClassCount(String packageName) {
  final bundle = _packagePool[packageName];
  if (bundle == null) return 0;
  var count = 0;
  for (final byName in bundle.bridgedClasses.values) {
    count += byName.length;
  }
  return count;
}