enclosingTypeName

fun enclosingTypeName(alwaysQualify: Boolean = this.alwaysQualify): DeclaredTypeName?

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