findMixins<I> abstract method

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

Finds mixins applied to a class, returning them as typed Class instances.

Type Parameters:

  • I: The expected type of the mixins.

Parameters:

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

Returns:

Example

class Example with MixinA, MixinB {}
final exampleClass = await loader.loadClass<Example>('com.example.Example');
final mixins = loader.findMixins<MixinA>(exampleClass);

Implementation

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