findConstraints<I> abstract method

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

Retrieves the constraints applied to a class.

Type Parameters:

  • I: The constraint type to match.

Parameters:

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

Returns:

  • A list of Class instances representing the constraints.

Example

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

Implementation

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