ConfigurableListablePodFactory class abstract interface

The most comprehensive pod factory interface combining listing and configuration capabilities.

This interface is typically implemented by the main application context in Jetleaf applications. It provides full control over pod management, including dependency resolution, metadata caching, and singleton pre-instantiation.

Usage Example:

final factory = JetleafApplicationContext();

// Configure the factory
factory.setAllowCircularReferences(true);
factory.registerResolvableDependency(Class<Config>(), appConfig);

// Pre-instantiate singletons for faster startup
await factory.preInstantiateSingletons();

// Use the factory
final app = await factory.get<Application>('app');
await app.run();

See also:

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

addPodProcessor(PodProcessor processor) → void
Registers a new pod-aware processor.
inherited
addSingletonCallback(String name, Class type, Consumer<Object> callback) → void
Add a callback to be executed when the singleton associated with name is initialized.
inherited
clearMetadataCache() → void
Clears the internal metadata cache.
clearSingletonCache() → void
Clears all cached singleton pods.
inherited
containsDefinition(String name) bool
Returns true if this registry contains a pod with the given name.
inherited
containsLocalPod(String podName) Future<bool>
Checks if a pod with the given name is registered locally in this factory.
inherited
containsPod(String podName) Future<bool>
Checks if a pod with the given name is registered in the factory.
inherited
containsSingleton(String name) bool
Returns true if this registry contains a pod with the given name.
inherited
containsType(Class type, [bool allowPodProviderInit = false]) Future<bool>
Checks if the factory contains a pod of the specified type.
inherited
copyConfigurationFrom(ConfigurablePodFactory otherFactory) → void
Copies configuration from another factory.
inherited
destroyPod(String podName, Object podInstance) Future<void>
Destroys a pod instance by name and instance.
inherited
destroyScopedPod(String podName) → void
Destroys all pods in the specified scope.
inherited
destroySingletons() → void
Destroys all singleton pods in the factory.
inherited
findAllAnnotationsOnPod<A>(String podName, Class<A> type) Future<Set<A>>
Finds all annotations of the specified type on a pod.
inherited
findAnnotationOnPod<A>(String podName, Class<A> type) Future<A?>
Finds a specific annotation on a pod.
inherited
get<T>(Class<T> type, [List<ArgumentValue>? args]) Future<T>
Retrieves a pod instance by its type with optional arguments.
inherited
getAlias(String name) String?
Retrieves the primary name associated with the given alias.
inherited
getAliases(String podName) List<String>
Retrieves all alias names for the specified pod.
inherited
getAllowCircularReferences() bool
Retrieves the current circular reference setting.
inherited
getAllowDefinitionOverriding() bool
Retrieves the current definition overriding setting.
inherited
getAllowRawInjection() bool
Retrieves the current raw injection despite wrapping setting.
inherited
getApplicationStartup() ApplicationStartup
Defines a contract for components that are aware of and can interact with an ApplicationStartup strategy.
inherited
getConversionService() → ConversionService
Retrieves the currently assigned ConversionService.
inherited
getDefinition(String name) PodDefinition
Retrieve the pod registered under name.
inherited
getDefinitionByClass(Class type) PodDefinition
Returns the pod definition for the specified class type.
inherited
getDefinitionNames() List<String>
Returns a list of all pod names currently registered.
inherited
getMergedPodDefinition(String podName) RootPodDefinition
Retrieves the merged pod definition for the specified pod name.
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
getParentFactory() PodFactory?
Retrieves the parent factory in the hierarchy, if any.
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
getPodExpressionResolver() PodExpressionResolver?
Retrieves the current expression resolver.
inherited
getPodNames(Class type, {bool includeNonSingletons = false, bool allowEagerInit = false}) Future<List<String>>
Retrieves all pod names for pods of the specified type.
inherited
getPodNamesForAnnotation<A>(Class<A> type) Future<List<String>>
Retrieves pod names for pods annotated with the specified annotation type.
inherited
getPodNamesIterator() Iterator<String>
Returns an iterator over all pod names in the factory.
getPodProcessorCount() int
Gets the number of registered pod-aware processors.
inherited
getPodProcessors() List<PodProcessor>
Retrieves all registered pod-aware processors.
inherited
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.
inherited
getPodsWithAnnotation<A>(Class<A> type) Future<Map<String, Object>>
Retrieves pods with the specified annotation as a map of name to instance.
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
getRegisteredScope(String scopeName) PodScope?
Retrieves a registered scope by name.
inherited
getRegisteredScopeNames() List<String>
Retrieves all registered scope names.
inherited
getSingleton(String name, {bool allowEarlyReference = true, ObjectFactory<Object>? factory}) Future<Object?>
Retrieve the pod registered under name.
inherited
getSingletonCount() int
Returns the total number of pods registered.
inherited
getSingletonNames() List<String>
Returns a list of all pod names currently registered.
inherited
isActuallyInCreation(String podName) bool
Checks if a pod with the given name is currently being created.
inherited
isAlias(String name) bool
Checks whether the given name is registered as an alias.
inherited
isAutowireCandidate(String podName, DependencyDescriptor descriptor) bool
Checks if a pod is a candidate for autowiring for the given dependency.
isCachePodMetadata() bool
Checks if pod metadata caching is enabled.
inherited
isNameInUse(String name) Future<bool>
Returns true if name is currently in use in this registry.
inherited
isPodProvider(String podName, [RootPodDefinition? rpd]) Future<bool>
Checks if the specified pod name refers to a pod provider.
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
preInstantiateSingletons() Future<void>
Pre-instantiates all singleton pods.
registerAlias(String name, String alias) → void
Registers an alias for an existing name in the registry.
inherited
registerDefinition(String name, PodDefinition pod) Future<void>
Register a new pod under the given name.
inherited
registerIgnoredDependency(Class type) → void
Registers a dependency type that should be ignored during autowiring.
registerResolvableDependency(Class type, [Object? autowiredValue]) → void
Registers a resolvable dependency for autowiring.
registerScope(String scopeName, PodScope scope) → void
Registers a new scope with the given name.
inherited
registerSingleton(String name, Class type, {ObjectHolder<Object>? object, ObjectFactory<Object>? factory}) Future<void>
Register a new pod under the given name.
inherited
removeAlias(String alias) → void
Removes an alias from the registry.
inherited
removeDefinition(String name) Future<void>
Remove the pod associated with name.
inherited
removeSingleton(String name) → void
Remove the pod associated with name.
inherited
resolveDependency(DependencyDescriptor descriptor, [Set<String>? autowiredPods]) Future<Object?>
Resolves a dependency based on the provided descriptor.
inherited
setAllowCircularReferences(bool value) → void
Allows or disallows circular references between pods.
inherited
setAllowDefinitionOverriding(bool value) → void
Allows or disallows overriding of pod definitions.
inherited
setAllowRawInjection(bool value) → void
Allows or disallows raw injection despite wrapping.
inherited
setApplicationStartup(ApplicationStartup applicationStartup) → void
Defines a contract for components that are aware of and can interact with an ApplicationStartup strategy.
inherited
setCachePodMetadata(bool cachePodMetadata) → void
Enables or disables caching of pod metadata for performance optimization.
inherited
setConversionService(ConversionService conversionService) → void
Sets an assigned ConversionService.
inherited
setParentFactory(PodFactory? parentFactory) → void
Sets the parent factory for this hierarchical factory.
inherited
setPodExpressionResolver(PodExpressionResolver? valueResolver) → void
Sets the expression resolver for resolving expressions in pod definitions.
inherited
toString() String
A string representation of this object.
inherited

Operators

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