# PodProvider<T> class abstract

Interface for objects that are themselves factories for other objects.

This interface is used when you need more control over object creation than simple instantiation provides. PodProvider can create objects dynamically, perform complex initialization, or return different instances based on configuration or runtime conditions.

PodProvider is a powerful pattern for:

- Creating objects that require complex initialization
- Returning different implementations based on configuration
- Integrating with external libraries or legacy code
- Creating proxy objects or decorators

## Key Concepts

- Object Creation: The get method creates and returns the actual object
- Type Information: The getClass method provides type information for dependency injection
- Lifecycle: The isSingleton method controls whether the same instance is returned each time

## Usage

Implement this interface to create custom factory pods:

    class DatabaseConnectionFactory implements PodProvider<DatabaseConnection> {
      final String connectionUrl;
      final String username;
      final String password;

      DatabaseConnectionFactory(this.connectionUrl, this.username, this.password);

      @override
      ObjectHolder<DatabaseConnection>? get() {
        return DatabaseConnection.create(
          url: connectionUrl,
          username: username,
          password: password,
        );
      }

      @override
      Class? getClass() => Class<DatabaseConnection>();

      @override
      bool isSingleton() => true; // Reuse the same connection
    }

## Registration

Factory pods are registered like normal pods:

    @Pod
    DatabaseConnectionFactory databaseConnectionFactory() {
      return DatabaseConnectionFactory(
        'jdbc:postgresql://localhost:5432/mydb',
        'user',
        'password',
      );
    }

## Accessing Factory vs Product

- To get the product: `context.getPod<DatabaseConnection>()`
- To get the factory: `context.getPod<PodProvider>('&databaseConnectionFactory')`

Annotations
  - @Generic(PodProvider)

## Constructors

PodProvider.new()

## Properties

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

## Methods

get([Class? requiredType]) → FutureOr<ObjectHolder<T>?>
  Interface for objects that are themselves factories for other objects.
getClass() → Class?
  Returns the type of object that this factory creates.
isEagerInit() → bool
  Returns whether this factory pod should be eagerly initialized.
isPrototype() → bool
  Returns whether this factory creates prototype instances instead of singletons.
isSingleton() → bool
  Returns whether this factory creates singleton or prototype instances.
noSuchMethod(Invocation invocation) → dynamic
  Invoked when a nonexistent method or property is accessed.
  inherited
supportsType(Class type) → bool
  Checks whether this factory supports creating objects of the specified type.
toString() → String
  A string representation of this object.
  inherited

## Operators

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