ListablePodFactory class abstract interface

Extends PodFactory with capabilities to list and query pods.

This interface provides methods to discover pods based on type, annotations, and other criteria. Useful for batch operations and framework integration.

Usage Example:

final factory = getListablePodFactory();

// Get all service pods
final serviceNames = await factory.getPodNames(Class<Service>());

// Get all pods with a specific annotation
final annotatedPods = await factory.getPodsWithAnnotation(Class<RestController>());
Implemented types
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.
inherited
containsPod(String podName) Future<bool>
Checks if a pod with the given name is registered in the factory.
inherited
containsType(Class type, [bool allowPodProviderInit = false]) Future<bool>
Checks if the factory contains a pod of the specified type.
inherited
findAllAnnotationsOnPod<A>(String podName, Class<A> type) Future<Set<A>>
Finds all annotations of the specified type on a pod.
findAnnotationOnPod<A>(String podName, Class<A> type) Future<A?>
Finds a specific annotation on a pod.
get<T>(Class<T> type, [List<ArgumentValue>? args]) Future<T>
Retrieves a pod instance by its type with optional arguments.
inherited
getAliases(String podName) List<String>
Retrieves all alias names for the specified pod.
inherited
getDefinitionNames() List<String>
Returns a list of all pod names currently registered.
inherited
getNamedObject(String podName, [List<ArgumentValue>? args]) Future<Object>
Retrieves a pod as a generic Object by its name with optional arguments.
inherited
getNumberOfPodDefinitions() int
Returns the total number of pods registered.
inherited
getObject(Class<Object> type, [List<ArgumentValue>? args]) Future<Object>
Retrieves a pod as a generic Object by its type with optional arguments.
inherited
getPackageName() String
Represents an abstraction for identifying the package that an object, resource, or service belongs to.
inherited
getPod<T>(String podName, [List<ArgumentValue>? args, Class<T>? type]) Future<T>
Retrieves a pod instance by its name with optional arguments.
inherited
getPodClass(String podName) Future<Class>
Retrieves the Class object for the specified pod name.
inherited
getPodNames(Class type, {bool includeNonSingletons = false, bool allowEagerInit = false}) Future<List<String>>
Retrieves all pod names for pods of the specified type.
getPodNamesForAnnotation<A>(Class<A> type) Future<List<String>>
Retrieves pod names for pods annotated with the specified annotation type.
getPodsOf<T>(Class<T> type, {bool includeNonSingletons = false, bool allowEagerInit = false}) Future<Map<String, T>>
Retrieves all pods of the specified type as a map of name to instance.
getPodsWithAnnotation<A>(Class<A> type) Future<Map<String, Object>>
Retrieves pods with the specified annotation as a map of name to instance.
getProvider<T>(Class<T> type, {String? podName, bool allowEagerInit = false}) Future<ObjectProvider<T>>
Retrieves a provider for a pod, allowing for lazy or eager initialization.
inherited
isPrototype(String podName) Future<bool>
Checks if the specified pod is configured as a prototype.
inherited
isSingleton(String podName) Future<bool>
Checks if the specified pod is configured as a singleton.
inherited
isTypeMatch(String name, Class typeToMatch, [bool allowPodProviderInit = false]) Future<bool>
Checks if the pod with the specified name matches the given type.
inherited
noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
resolveDependency(DependencyDescriptor descriptor, [Set<String>? autowiredPods]) Future<Object?>
Resolves a dependency based on the provided descriptor.
inherited
toString() String
A string representation of this object.
inherited

Operators

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