# matches abstract method

bool matches(

1. Class sourceType,
2. Class targetType

)

A contract for a converter that only matches under certain conditions.

This is useful in frameworks where type conversion should occur only if some custom logic (e.g., annotations, context, runtime checks) validates it.

You can implement this interface when you want to provide more granular control over when a converter should be applied.

### 🔧 Example:

    class MyConditionalConverter implements ConditionalConverter {
      @override
      bool matches(Class sourceType, Class targetType) {
        return sourceType.getType() == String && targetType.getType() == Uri;
      }
    }

Determines if the converter should apply for the given `sourceType` and `targetType`.

## Implementation

    bool matches(Class sourceType, Class targetType);