Minor. Change default for needPrimitiveBoxing
This commit is contained in:
@@ -20,7 +20,7 @@ import org.jetbrains.kotlin.types.KotlinType
|
|||||||
import org.jetbrains.kotlin.types.Variance
|
import org.jetbrains.kotlin.types.Variance
|
||||||
|
|
||||||
internal class TypeMappingMode private constructor(
|
internal class TypeMappingMode private constructor(
|
||||||
val needPrimitiveBoxing: Boolean = false,
|
val needPrimitiveBoxing: Boolean = true,
|
||||||
val isForAnnotationParameter: Boolean = false,
|
val isForAnnotationParameter: Boolean = false,
|
||||||
// Here DeclarationSiteWildcards means wildcard generated because of declaration-site variance
|
// Here DeclarationSiteWildcards means wildcard generated because of declaration-site variance
|
||||||
val skipDeclarationSiteWildcards: Boolean = false,
|
val skipDeclarationSiteWildcards: Boolean = false,
|
||||||
@@ -33,13 +33,13 @@ internal class TypeMappingMode private constructor(
|
|||||||
* kotlin.Int is mapped to Ljava/lang/Integer;
|
* kotlin.Int is mapped to Ljava/lang/Integer;
|
||||||
*/
|
*/
|
||||||
@JvmField
|
@JvmField
|
||||||
val GENERIC_TYPE = TypeMappingMode(needPrimitiveBoxing = true)
|
val GENERIC_TYPE = TypeMappingMode()
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* kotlin.Int is mapped to I
|
* kotlin.Int is mapped to I
|
||||||
*/
|
*/
|
||||||
@JvmField
|
@JvmField
|
||||||
val DEFAULT = TypeMappingMode(genericArgumentMode = GENERIC_TYPE)
|
val DEFAULT = TypeMappingMode(genericArgumentMode = GENERIC_TYPE, needPrimitiveBoxing = false)
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* kotlin.Int is mapped to Ljava/lang/Integer;
|
* kotlin.Int is mapped to Ljava/lang/Integer;
|
||||||
@@ -55,7 +55,8 @@ internal class TypeMappingMode private constructor(
|
|||||||
@JvmField
|
@JvmField
|
||||||
val VALUE_FOR_ANNOTATION = TypeMappingMode(
|
val VALUE_FOR_ANNOTATION = TypeMappingMode(
|
||||||
isForAnnotationParameter = true,
|
isForAnnotationParameter = true,
|
||||||
genericArgumentMode = TypeMappingMode(isForAnnotationParameter = true, needPrimitiveBoxing = true, genericArgumentMode = GENERIC_TYPE))
|
needPrimitiveBoxing = false,
|
||||||
|
genericArgumentMode = TypeMappingMode(isForAnnotationParameter = true, genericArgumentMode = GENERIC_TYPE))
|
||||||
|
|
||||||
|
|
||||||
@JvmStatic
|
@JvmStatic
|
||||||
@@ -79,7 +80,6 @@ internal class TypeMappingMode private constructor(
|
|||||||
val contravariantArgumentMode =
|
val contravariantArgumentMode =
|
||||||
if (!canBeUsedInSupertypePosition)
|
if (!canBeUsedInSupertypePosition)
|
||||||
TypeMappingMode(
|
TypeMappingMode(
|
||||||
needPrimitiveBoxing = true,
|
|
||||||
isForAnnotationParameter = isForAnnotationParameter,
|
isForAnnotationParameter = isForAnnotationParameter,
|
||||||
skipDeclarationSiteWildcards = false,
|
skipDeclarationSiteWildcards = false,
|
||||||
skipDeclarationSiteWildcardsIfPossible = true)
|
skipDeclarationSiteWildcardsIfPossible = true)
|
||||||
@@ -87,7 +87,6 @@ internal class TypeMappingMode private constructor(
|
|||||||
null
|
null
|
||||||
|
|
||||||
return TypeMappingMode(
|
return TypeMappingMode(
|
||||||
needPrimitiveBoxing = true,
|
|
||||||
isForAnnotationParameter = isForAnnotationParameter,
|
isForAnnotationParameter = isForAnnotationParameter,
|
||||||
skipDeclarationSiteWildcards = !canBeUsedInSupertypePosition,
|
skipDeclarationSiteWildcards = !canBeUsedInSupertypePosition,
|
||||||
skipDeclarationSiteWildcardsIfPossible = true,
|
skipDeclarationSiteWildcardsIfPossible = true,
|
||||||
|
|||||||
Reference in New Issue
Block a user