ListablePodDefinitionRegistry class abstract interface

Interface for registries that provides additional functionality for listing and enumeration.

This interface adds methods for retrieving all pod definitions and their names, which is useful for framework components that need to process all pods of a certain type or annotation.

Key Features

  • Getting all pod names
  • Checking if a pod exists
  • Getting the count of all pods

Usage Example

// Create a listable pod definition registry
ListablePodDefinitionRegistry registry = MyListablePodDefinitionRegistry();

// Check if a pod name is in use
if (registry.isNameInUse('userService')) {
  print('userService is registered');
} else {
  print('userService is not available');
}

// Get all pod names
List<String> allPods = registry.getDefinitionNames();
print('Total pods: ${allPods.length}');

// Get all pod definitions
List<PodDefinition> allDefinitions = registry.getDefinitions();
print('Total pod definitions: ${allDefinitions.length}');

// Get the count of all pods
int count = registry.getDefinitionCount();
print('Total pods registered: $count');
Implementers

Properties

hashCode int
The hash code for this object.
no setterinherited
runtimeType Type
A representation of the runtime type of the object.
no setterinherited

Methods

containsDefinition(String name) bool
Returns true if this registry contains a pod with the given name.
getDefinitionNames() List<String>
Returns a list of all pod names currently registered.
getNumberOfPodDefinitions() int
Returns the total number of pods registered.
noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
toString() String
A string representation of this object.
inherited

Operators

operator ==(Object other) bool
The equality operator.
inherited