enclosingTypeName

fun enclosingTypeName(): DeclaredTypeName?

Returns the enclosing type, like Map for Map.Entry. Returns null if this type is not nested in another type.