# supportsType method

bool supportsType(

1. Class type

)

Checks whether this factory supports creating objects of the specified type.

This method allows callers to verify type compatibility before attempting object creation, enabling more intelligent factory selection and usage.

## Parameters

- `type`: The Class object representing the type to check support for

## Return Value

- `true` if this factory can create objects assignable to the specified type
- `false` if this factory cannot create compatible objects

## Example

    class DatabaseFactory extends PodProvider<Database> {
      @override
      ObjectHolder<Database>? get() => PostgreSQLDatabase();

      @override
      Class? getObjectType() => Class<PostgreSQLDatabase>();
    }

    final factory = DatabaseFactory();

    // Check type support before using
    if (factory.supportsType(Class<PostgreSQLDatabase>())) {
      final db = factory.get() as PostgreSQLDatabase;
      db.enablePostgreSQLFeatures();
    }

    if (factory.supportsType(Class<Database>())) {
      // This will be true since PostgreSQLDatabase extends Database
      final db = factory.get();
    }

## Factory Selection

Use this method to select appropriate factories from a collection:

    List<PodProvider> factories = [
      PostgreSQLFactory(),
      MySQLFactory(),
      MongoDBFactory(),
    ];

    // Find factories that support SQL databases
    final sqlFactories = factories
        .where((f) => f.supportsType(Class<SQLDatabase>()))
        .toList();

## Implementation

    bool supportsType(Class type) => getClass()?.isAssignableTo(type) ?? false;