findTypeParameters abstract method

List<Class> findTypeParameters(
  1. Class parentClass
)

Finds the type parameters of a generic class.

Parameters:

  • parentClass: The class representing the generic type.

Returns:

  • A list of Class instances representing the type parameters.

Example

final listClass = await loader.loadClass<List<String>>('dart:core/list.dart.List');
final typeParams = loader.findTypeParameters(listClass);
print(typeParams.map((arg) => arg.qualifiedName)); // e.g., ["dart:core/string.dart.String"]

Implementation

List<Class> findTypeParameters(Class parentClass);