GenericApplicationContext.withPodFactory constructor

GenericApplicationContext.withPodFactory(
  1. DefaultListablePodFactory podFactory, [
  2. ApplicationContext? parent
])

Creates a new GenericApplicationContext with the given pod factory.

Use this constructor when you need a custom configured pod factory with specific settings like circular reference handling or definition overriding.

Parameters:

  • podFactory: The pod factory to use for this context
  • parent: Optional parent application context

Example:

final customFactory = DefaultListablePodFactory();
customFactory.setAllowCircularReferences(true);
customFactory.setAllowDefinitionOverriding(true);

final context = GenericApplicationContext.withPodFactory(customFactory);

Implementation

GenericApplicationContext.withPodFactory(DefaultListablePodFactory podFactory, [ApplicationContext? parent]) : this.all(parent, podFactory);