HierarchicalPodFactory class abstract interface

Extends PodFactory with hierarchical capabilities for parent-child relationships.

Hierarchical factories allow for creating factory trees where child factories can delegate to parent factories for pod resolution. This enables modular application architectures and configuration inheritance.

Usage Example:

final parentFactory = createParentFactory();
final childFactory = createChildFactory(parentFactory);

// Child factory can access pods from parent
final parentPod = await childFactory.getPod<ParentService>('parentService');
Inheritance
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

containsLocalPod(String podName) Future<bool>
Checks if a pod with the given name is registered locally in this factory.
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
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
getNamedObject(String podName, [List<ArgumentValue>? args]) Future<Object>
Retrieves a pod as a generic Object by its name with optional arguments.
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
getParentFactory() PodFactory?
Retrieves the parent factory in the hierarchy, if any.
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
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
isPodProvider(String podName, [RootPodDefinition? rpd]) Future<bool>
Checks if the specified pod name refers to a pod provider.
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