KaTypeMappingMode¶
enum class KaTypeMappingMode : Enum<KaTypeMappingMode>
KaTypeMappingMode determines how a Kotlin type is mapped to a Java type when calling KaType.asPsiType.
Entries¶
DEFAULT¶
Kotlin primitives are mapped to Java primitives in non-generic usages. For example, kotlin.Int is mapped to int.
DEFAULT_UAST¶
Similar to DEFAULT, but type aliases are additionally mapped to their expanded form.
GENERIC_ARGUMENT¶
Kotlin primitives are mapped to Java boxed types in non-generic usages. For example, kotlin.Int is mapped to java.lang.Integer.
SUPER_TYPE¶
Kotlin primitives are mapped to Java boxed types in non-generic usages. For example, kotlin.Int is mapped to java.lang.Integer.
SUPER_TYPE_KOTLIN_COLLECTIONS_AS_IS¶
Similar to SUPER_TYPE, except that Kotlin collections are not converted to their Java equivalents.
RETURN_TYPE_BOXED¶
Kotlin primitives in method return types are mapped to Java boxed types. For example, kotlin.Int is mapped to java.lang.Integer.
RETURN_TYPE¶
The optimal mode to convert a declaration's return type if it's part of the signature.
FUNCTION_RETURN_TYPE¶
Same as RETURN_TYPE, but Kotlin Unit is mapped to Java void. Should be used only for return types of functions (not properties or getters), because void type can't be used anywhere else.
VALUE_PARAMETER¶
The optimal mode to convert a value parameter's type if it's part of the signature.
VALUE_PARAMETER_BOXED¶
The same as VALUE_PARAMETER, but value classes are boxed.
Companion properties¶
entries¶
Returns an immutable kotlin.enums.EnumEntries list containing the constants of this enum type, in the order they're declared.
Companion functions¶
valueOf¶
fun valueOf(value: String): KaTypeMappingMode
Returns the enum constant of this type with the specified name. The string must match exactly an identifier used to declare an enum constant in this type. (Extraneous whitespace characters are not permitted.)
Throws
kotlin.IllegalArgumentException-
if this enum type has no constant with the specified name
values¶
fun values(): Array<KaTypeMappingMode>
Returns an array containing the constants of this enum type, in the order they're declared.
This method may be used to iterate over the constants.
The function returns a new instance of the array on every call. The array could be mutated, so working with it may also require defensive copying. Consider using entries property as a more efficient alternative returning an immutable list of enum entries.