# findAllConstraints method

1. @override

List<Class> findAllConstraints(

1. Class parentClass, [
2. bool declared = true

])
override

Retrieves all constraints applied to a class.

Parameters:

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

Returns:

- A list of Class instances representing all constraints.

## Example

    final exampleClass = await loader.loadClass<MyClass>('package:example/test.dart.MyClass');
    final constraints = loader.findAllConstraints(exampleClass);

## Implementation

    @override
    List<Class> findAllConstraints(Class parentClass, [bool declared = true]) {
      _checkClosed();

      final cacheKey = "${_buildCacheKey(parentClass)}:constraints:$declared";

      // Check cache first
      final cached = _constraintCache[cacheKey];
      if (cached != null) {
        _hitCount++;
        return List.from(cached);
      }

      _missCount++;

      // Compute classes
      final classes = _computeAllConstraints(parentClass, declared);

      // Cache result
      _constraintCache[cacheKey] = classes;

      return List.from(classes.toSet().toList());
    }