findConstraints<I> abstract method
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]);