Annotate KTypeProjection factory methods with JvmStatic
#KT-30084 Fixed
This commit is contained in:
@@ -141,10 +141,13 @@ public final data class KTypeProjection {
|
||||
public companion object of KTypeProjection {
|
||||
public final val STAR: kotlin.reflect.KTypeProjection { get; }
|
||||
|
||||
@kotlin.jvm.JvmStatic
|
||||
public final fun contravariant(type: kotlin.reflect.KType): kotlin.reflect.KTypeProjection
|
||||
|
||||
@kotlin.jvm.JvmStatic
|
||||
public final fun covariant(type: kotlin.reflect.KType): kotlin.reflect.KTypeProjection
|
||||
|
||||
@kotlin.jvm.JvmStatic
|
||||
public final fun invariant(type: kotlin.reflect.KType): kotlin.reflect.KTypeProjection
|
||||
}
|
||||
}
|
||||
@@ -172,10 +175,13 @@ public final data class KTypeProjection {
|
||||
/*∆*/ public companion object of KTypeProjection {
|
||||
/*∆*/ public final val STAR: kotlin.reflect.KTypeProjection { get; }
|
||||
/*∆*/
|
||||
/*∆*/ @kotlin.jvm.JvmStatic
|
||||
/*∆*/ public final fun contravariant(type: kotlin.reflect.KType): kotlin.reflect.KTypeProjection
|
||||
/*∆*/
|
||||
/*∆*/ @kotlin.jvm.JvmStatic
|
||||
/*∆*/ public final fun covariant(type: kotlin.reflect.KType): kotlin.reflect.KTypeProjection
|
||||
/*∆*/
|
||||
/*∆*/ @kotlin.jvm.JvmStatic
|
||||
/*∆*/ public final fun invariant(type: kotlin.reflect.KType): kotlin.reflect.KTypeProjection
|
||||
/*∆*/ }
|
||||
/*∆*/ }
|
||||
|
||||
@@ -126,10 +126,13 @@ public final data class KTypeProjection {
|
||||
public companion object of KTypeProjection {
|
||||
public final val STAR: kotlin.reflect.KTypeProjection { get; }
|
||||
|
||||
@kotlin.jvm.JvmStatic
|
||||
public final fun contravariant(type: kotlin.reflect.KType): kotlin.reflect.KTypeProjection
|
||||
|
||||
@kotlin.jvm.JvmStatic
|
||||
public final fun covariant(type: kotlin.reflect.KType): kotlin.reflect.KTypeProjection
|
||||
|
||||
@kotlin.jvm.JvmStatic
|
||||
public final fun invariant(type: kotlin.reflect.KType): kotlin.reflect.KTypeProjection
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1,10 +1,12 @@
|
||||
/*
|
||||
* Copyright 2010-2019 JetBrains s.r.o. and Kotlin Programming Language contributors.
|
||||
* Copyright 2010-2020 JetBrains s.r.o. and Kotlin Programming Language contributors.
|
||||
* Use of this source code is governed by the Apache 2.0 license that can be found in the license/LICENSE.txt file.
|
||||
*/
|
||||
|
||||
package kotlin.reflect
|
||||
|
||||
import kotlin.jvm.JvmStatic
|
||||
|
||||
/**
|
||||
* Represents a type. Type is usually either a class with optional type arguments,
|
||||
* or a type parameter of some declaration, plus nullability.
|
||||
@@ -92,6 +94,7 @@ public data class KTypeProjection constructor(
|
||||
* without any use-site variance modifiers applied to it.
|
||||
* For example, in the type `Set<String>`, `String` is an invariant projection of the type represented by the class `String`.
|
||||
*/
|
||||
@JvmStatic
|
||||
public fun invariant(type: KType): KTypeProjection =
|
||||
KTypeProjection(KVariance.INVARIANT, type)
|
||||
|
||||
@@ -99,6 +102,7 @@ public data class KTypeProjection constructor(
|
||||
* Creates a contravariant projection of a given type, denoted by the `in` modifier applied to a type.
|
||||
* For example, in the type `MutableList<in Number>`, `in Number` is a contravariant projection of the type of class `Number`.
|
||||
*/
|
||||
@JvmStatic
|
||||
public fun contravariant(type: KType): KTypeProjection =
|
||||
KTypeProjection(KVariance.IN, type)
|
||||
|
||||
@@ -106,6 +110,7 @@ public data class KTypeProjection constructor(
|
||||
* Creates a covariant projection of a given type, denoted by the `out` modifier applied to a type.
|
||||
* For example, in the type `Array<out Number>`, `out Number` is a covariant projection of the type of class `Number`.
|
||||
*/
|
||||
@JvmStatic
|
||||
public fun covariant(type: KType): KTypeProjection =
|
||||
KTypeProjection(KVariance.OUT, type)
|
||||
}
|
||||
|
||||
+3
@@ -4777,12 +4777,15 @@ public final class kotlin/reflect/KTypeProjection {
|
||||
public fun <init> (Lkotlin/reflect/KVariance;Lkotlin/reflect/KType;)V
|
||||
public final fun component1 ()Lkotlin/reflect/KVariance;
|
||||
public final fun component2 ()Lkotlin/reflect/KType;
|
||||
public static final fun contravariant (Lkotlin/reflect/KType;)Lkotlin/reflect/KTypeProjection;
|
||||
public final fun copy (Lkotlin/reflect/KVariance;Lkotlin/reflect/KType;)Lkotlin/reflect/KTypeProjection;
|
||||
public static synthetic fun copy$default (Lkotlin/reflect/KTypeProjection;Lkotlin/reflect/KVariance;Lkotlin/reflect/KType;ILjava/lang/Object;)Lkotlin/reflect/KTypeProjection;
|
||||
public static final fun covariant (Lkotlin/reflect/KType;)Lkotlin/reflect/KTypeProjection;
|
||||
public fun equals (Ljava/lang/Object;)Z
|
||||
public final fun getType ()Lkotlin/reflect/KType;
|
||||
public final fun getVariance ()Lkotlin/reflect/KVariance;
|
||||
public fun hashCode ()I
|
||||
public static final fun invariant (Lkotlin/reflect/KType;)Lkotlin/reflect/KTypeProjection;
|
||||
public fun toString ()Ljava/lang/String;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user