typeReferencesRecursive

fun ClassOrInterfaceType.typeReferencesRecursive(): Sequence<ClassOrInterfaceType>

Includes all types referenced by the receiver ClassOrInterfaceType, optionally including itself.

For instance, given the function:

public javax.inject.Provider<List<String>> getStringListProvider() { /* ... */}

This function with will return a sequence of 'javax.inject.Provider', 'List', 'String'.

Return

A Sequence of all Types referenced by the receiver class type.

Sources

Link copied to clipboard