findSuperClassArguments abstract method
Finds the type arguments of the superclass of a given parentClass
.
Parameters:
parentClass
: The class whose superclass should be located.declared
: Iftrue
(default), returns the directly declared superclass.
Iffalse
, searches up the hierarchy.
Returns:
- A list of Class instances representing the type arguments of the superclass.
Example
final listClass = await loader.loadClass<List>('dart:core/list.dart.List');
final superIterableArgs = loader.findSuperClassArguments(listClass);
print(superIterableArgs.map((arg) => arg.qualifiedName)); // e.g., ["dart:core/iterable.dart.Iterable"]
Implementation
List<Class> findSuperClassArguments(Class parentClass, [bool declared = true]);