flatten
Flattens the list of KoTypeArgumentDeclaration
objects into a list of KoBaseTypeDeclaration
objects.
This method recursively extracts all the type arguments and their source type declarations, producing a flat list that includes both the outer types and their nested generic types.
For example:
For a type argument like
String
, it returnslistOf()
.For a type argument like
List<String>
, it returnslistOf(String)
.For a type argument like
Map<List<String>, Int>
, it returnslistOf(List, String, Int)
.
Return
A flattened list of KoBaseTypeDeclaration
objects, representing the source types of all type arguments and their nested types.