findAllMixins abstract method
Finds all mixins applied to the specified class with caching.
Parameters:
mixedClass
: The class to find mixins fordeclared
: Whether to include mixins from superclasses (default: true)
Returns:
- List of applied mixins in application order
- Empty list if no mixins are applied
- Cached results for subsequent calls
Mixin Resolution
- Transitive (default): Includes mixins from entire class hierarchy
- Direct only: Only mixins directly applied to this class
- Application Order: Mixins are returned in the order they were applied
Example
class MyClass extends BaseClass with MixinA, MixinB {}
final myClass = await loader.loadClass<MyClass>('com.example.MyClass');
final mixins = await loader.findMixins(myClass);
// Returns: [MixinA, MixinB] (in application order)
Caching Strategy
- Results cached by class and transitivity flag
- Preserves mixin application order in cache
- Efficient lookup for mixin composition analysis
Implementation
List<Class> findAllMixins(Class parentClass, [bool declared = true]);