getDefinitionNames method

  1. @override
List<String> getDefinitionNames()

Returns a list of all pod names currently registered.

This method provides access to all pod names in the registry, which is useful for debugging, administration, and programmatic registry inspection.

Returns an unmodifiable list of all pod names in the registry. The list may be empty but will never be null. The order of names is implementation-dependent.

Example:

final allNames = registry.getDefinitionNames();
print('Registered pods: ${allNames.join(', ')}');
// Output: Registered pods: userService, productService, configService

for (final name in allNames) {
  final pod = registry.getDefinition(name);
  // Process each pod
}

Implementation

@override
List<String> getDefinitionNames() {
  final local = List<String>.from(getPodFactory().getDefinitionNames());
  if (_parent != null) {
    local.addAll(_parent!.getPodFactory().getDefinitionNames());
  }

  return local;
}