findConstraintArguments<I> abstract method

List<Class> findConstraintArguments<I>(
  1. Class parentClass, [
  2. bool declared = true
])

Retrieves the type arguments for a specific constraint applied to a class.

Type Parameters:

  • I: The constraint type to match.

Parameters:

  • parentClass: The class whose constraint arguments should be found.
  • declared: Whether to include inherited constraints (default: true).

Returns:

  • A list of Class instances representing the type arguments.

Example

final exampleClass = await loader.loadClass<MyClass>('com.example.MyClass');
final constraintArgs = loader.findConstraintArguments<SomeConstraint>(exampleClass);

Implementation

List<Class> findConstraintArguments<I>(Class parentClass, [bool declared = true]);