componentType<C> abstract method
Gets the component type for collection-like generic classes.
Type Parameters:
C
: The expected component type for type safety
Returns:
- A Class<C> representing the element type
null
if type information is unavailableClass<dynamic>
if not a collection-like type
Works with:
- Lists (
List<T>
→T
) - Sets (
Set<T>
→T
) - Maps (
Map<K,V>
→V
) - Other generic collections
Implementation
Class<C>? componentType<C>();