core: cleanup 'public', property access syntax
This commit is contained in:
@@ -25,14 +25,14 @@ import kotlin.reflect.KClass
|
||||
/**
|
||||
* Returns a Java [Class] instance corresponding to the given [KClass] instance.
|
||||
*/
|
||||
public val <T : Any> KClass<T>.java: Class<T>
|
||||
val <T : Any> KClass<T>.java: Class<T>
|
||||
@JvmName("getJavaClass")
|
||||
get() = (this as ClassBasedDeclarationContainer).jClass as Class<T>
|
||||
|
||||
/**
|
||||
* Returns a Java [Class] instance representing the primitive type corresponding to the given [KClass] if it exists.
|
||||
*/
|
||||
public val <T : Any> KClass<T>.javaPrimitiveType: Class<T>?
|
||||
val <T : Any> KClass<T>.javaPrimitiveType: Class<T>?
|
||||
get() {
|
||||
val thisJClass = (this as ClassBasedDeclarationContainer).jClass
|
||||
if (thisJClass.isPrimitive) return thisJClass as Class<T>
|
||||
@@ -54,7 +54,7 @@ public val <T : Any> KClass<T>.javaPrimitiveType: Class<T>?
|
||||
* Returns a Java [Class] instance corresponding to the given [KClass] instance.
|
||||
* In case of primitive types it returns corresponding wrapper classes.
|
||||
*/
|
||||
public val <T : Any> KClass<T>.javaObjectType: Class<T>
|
||||
val <T : Any> KClass<T>.javaObjectType: Class<T>
|
||||
get() {
|
||||
val thisJClass = (this as ClassBasedDeclarationContainer).jClass
|
||||
if (!thisJClass.isPrimitive) return thisJClass as Class<T>
|
||||
@@ -75,7 +75,7 @@ public val <T : Any> KClass<T>.javaObjectType: Class<T>
|
||||
/**
|
||||
* Returns a [KClass] instance corresponding to the given Java [Class] instance.
|
||||
*/
|
||||
public val <T : Any> Class<T>.kotlin: KClass<T>
|
||||
val <T : Any> Class<T>.kotlin: KClass<T>
|
||||
@JvmName("getKotlinClass")
|
||||
get() = Reflection.createKotlinClass(this) as KClass<T>
|
||||
|
||||
@@ -83,23 +83,21 @@ public val <T : Any> Class<T>.kotlin: KClass<T>
|
||||
/**
|
||||
* Returns the runtime Java class of this object.
|
||||
*/
|
||||
public val <T: Any> T.javaClass : Class<T>
|
||||
get() = (this as java.lang.Object).getClass() as Class<T>
|
||||
val <T: Any> T.javaClass : Class<T>
|
||||
get() = (this as java.lang.Object).`class` as Class<T>
|
||||
|
||||
@Deprecated("Use 'java' property to get Java class corresponding to this Kotlin class or cast this instance to Any if you really want to get the runtime Java class of this implementation of KClass.", ReplaceWith("(this as Any).javaClass"), level = DeprecationLevel.ERROR)
|
||||
public val <T: Any> KClass<T>.javaClass: Class<KClass<T>>
|
||||
@Deprecated("Use 'java' property to get Java class corresponding to this Kotlin class or cast this instance to Any if you really want to get the runtime Java class of this implementation of KClass.", ReplaceWith("(this as Any).javaClass"), level = DeprecationLevel.ERROR) val <T: Any> KClass<T>.javaClass: Class<KClass<T>>
|
||||
@JvmName("getRuntimeClassOfKClassInstance")
|
||||
get() = (this as java.lang.Object).getClass() as Class<KClass<T>>
|
||||
get() = (this as java.lang.Object).`class` as Class<KClass<T>>
|
||||
|
||||
/**
|
||||
* Checks if array can contain element of type [T].
|
||||
*/
|
||||
@Suppress("REIFIED_TYPE_PARAMETER_NO_INLINE")
|
||||
public fun <reified T : Any> Array<*>.isArrayOf(): Boolean =
|
||||
@Suppress("REIFIED_TYPE_PARAMETER_NO_INLINE") fun <reified T : Any> Array<*>.isArrayOf(): Boolean =
|
||||
T::class.java.isAssignableFrom(this.javaClass.componentType)
|
||||
|
||||
/**
|
||||
* Returns a [KClass] instance corresponding to the annotation type of this annotation.
|
||||
*/
|
||||
public val <T : Annotation> T.annotationClass: KClass<out T>
|
||||
val <T : Annotation> T.annotationClass: KClass<out T>
|
||||
get() = (this as java.lang.annotation.Annotation).annotationType().kotlin as KClass<out T>
|
||||
|
||||
@@ -37,4 +37,4 @@ package kotlin.jvm
|
||||
@Target(AnnotationTarget.CLASS)
|
||||
@Retention(AnnotationRetention.RUNTIME)
|
||||
@MustBeDocumented
|
||||
public annotation class PurelyImplements(public val value: String)
|
||||
annotation class PurelyImplements(val value: String)
|
||||
|
||||
@@ -25,7 +25,7 @@ import kotlin.annotation.AnnotationTarget.*
|
||||
@Target(FIELD)
|
||||
@Retention(AnnotationRetention.SOURCE)
|
||||
@MustBeDocumented
|
||||
public annotation class Volatile
|
||||
annotation class Volatile
|
||||
|
||||
/**
|
||||
* Marks the JVM backing field of the annotated property as `transient`, meaning that it is not
|
||||
@@ -34,7 +34,7 @@ public annotation class Volatile
|
||||
@Target(FIELD)
|
||||
@Retention(AnnotationRetention.SOURCE)
|
||||
@MustBeDocumented
|
||||
public annotation class Transient
|
||||
annotation class Transient
|
||||
|
||||
/**
|
||||
* Marks the JVM method generated from the annotated function as `strictfp`, meaning that the precision
|
||||
@@ -44,7 +44,7 @@ public annotation class Transient
|
||||
@Target(FUNCTION, CONSTRUCTOR, PROPERTY_GETTER, PROPERTY_SETTER, CLASS)
|
||||
@Retention(AnnotationRetention.SOURCE)
|
||||
@MustBeDocumented
|
||||
public annotation class Strictfp
|
||||
annotation class Strictfp
|
||||
|
||||
/**
|
||||
* Marks the JVM method generated from the annotated function as `synchronized`, meaning that the method
|
||||
@@ -54,4 +54,4 @@ public annotation class Strictfp
|
||||
@Target(FUNCTION, PROPERTY_GETTER, PROPERTY_SETTER)
|
||||
@Retention(AnnotationRetention.SOURCE)
|
||||
@MustBeDocumented
|
||||
public annotation class Synchronized
|
||||
annotation class Synchronized
|
||||
@@ -27,7 +27,7 @@ import kotlin.reflect.KClass
|
||||
@Target(AnnotationTarget.FUNCTION, AnnotationTarget.CONSTRUCTOR)
|
||||
@Retention(AnnotationRetention.BINARY)
|
||||
@MustBeDocumented
|
||||
public annotation class JvmOverloads
|
||||
annotation class JvmOverloads
|
||||
|
||||
|
||||
/**
|
||||
@@ -38,7 +38,7 @@ public annotation class JvmOverloads
|
||||
@Target(AnnotationTarget.FUNCTION, AnnotationTarget.PROPERTY, AnnotationTarget.PROPERTY_GETTER, AnnotationTarget.PROPERTY_SETTER)
|
||||
@Retention(AnnotationRetention.RUNTIME)
|
||||
@MustBeDocumented
|
||||
public annotation class JvmStatic
|
||||
annotation class JvmStatic
|
||||
|
||||
/**
|
||||
* Specifies the name for the Java class or method which is generated from this element.
|
||||
@@ -49,7 +49,7 @@ public annotation class JvmStatic
|
||||
@Target(AnnotationTarget.FUNCTION, AnnotationTarget.PROPERTY_GETTER, AnnotationTarget.PROPERTY_SETTER, AnnotationTarget.FILE)
|
||||
@Retention(AnnotationRetention.BINARY)
|
||||
@MustBeDocumented
|
||||
public annotation class JvmName(public val name: String)
|
||||
annotation class JvmName(val name: String)
|
||||
|
||||
/**
|
||||
* Instructs the Kotlin compiler to generate a multifile class with top-level functions and properties declared in this file as one of its parts.
|
||||
@@ -58,11 +58,11 @@ public annotation class JvmName(public val name: String)
|
||||
@Target(AnnotationTarget.FILE)
|
||||
@Retention(AnnotationRetention.SOURCE)
|
||||
@MustBeDocumented
|
||||
public annotation class JvmMultifileClass
|
||||
annotation class JvmMultifileClass
|
||||
|
||||
@Target(AnnotationTarget.FUNCTION, AnnotationTarget.PROPERTY_GETTER, AnnotationTarget.PROPERTY_SETTER, AnnotationTarget.FIELD)
|
||||
@Retention(AnnotationRetention.SOURCE)
|
||||
public annotation class JvmSynthetic
|
||||
annotation class JvmSynthetic
|
||||
|
||||
/**
|
||||
* This annotation indicates what exceptions should be declared by a function when compiled to a JVM method.
|
||||
@@ -84,7 +84,7 @@ public annotation class JvmSynthetic
|
||||
*/
|
||||
@Target(AnnotationTarget.FUNCTION, AnnotationTarget.PROPERTY_GETTER, AnnotationTarget.PROPERTY_SETTER, AnnotationTarget.CONSTRUCTOR)
|
||||
@Retention(AnnotationRetention.SOURCE)
|
||||
public annotation class Throws(public vararg val exceptionClasses: KClass<out Throwable>)
|
||||
annotation class Throws(vararg val exceptionClasses: KClass<out Throwable>)
|
||||
|
||||
|
||||
/**
|
||||
@@ -93,7 +93,7 @@ public annotation class Throws(public vararg val exceptionClasses: KClass<out Th
|
||||
@Target(AnnotationTarget.FIELD)
|
||||
@Retention(AnnotationRetention.BINARY)
|
||||
@MustBeDocumented
|
||||
public annotation class JvmField
|
||||
annotation class JvmField
|
||||
|
||||
/**
|
||||
* Instructs compiler to generate or omit wildcards for type arguments corresponding to parameters with declaration-site variance.
|
||||
|
||||
@@ -19,117 +19,117 @@
|
||||
package kotlin.jvm.functions
|
||||
|
||||
/** A function that takes 0 arguments. */
|
||||
public interface Function0<out R> : Function<R> {
|
||||
interface Function0<out R> : Function<R> {
|
||||
/** Invokes the function. */
|
||||
public operator fun invoke(): R
|
||||
operator fun invoke(): R
|
||||
}
|
||||
/** A function that takes 1 argument. */
|
||||
public interface Function1<in P1, out R> : Function<R> {
|
||||
interface Function1<in P1, out R> : Function<R> {
|
||||
/** Invokes the function with the specified argument. */
|
||||
public operator fun invoke(p1: P1): R
|
||||
operator fun invoke(p1: P1): R
|
||||
}
|
||||
/** A function that takes 2 arguments. */
|
||||
public interface Function2<in P1, in P2, out R> : Function<R> {
|
||||
interface Function2<in P1, in P2, out R> : Function<R> {
|
||||
/** Invokes the function with the specified arguments. */
|
||||
public operator fun invoke(p1: P1, p2: P2): R
|
||||
operator fun invoke(p1: P1, p2: P2): R
|
||||
}
|
||||
/** A function that takes 3 arguments. */
|
||||
public interface Function3<in P1, in P2, in P3, out R> : Function<R> {
|
||||
interface Function3<in P1, in P2, in P3, out R> : Function<R> {
|
||||
/** Invokes the function with the specified arguments. */
|
||||
public operator fun invoke(p1: P1, p2: P2, p3: P3): R
|
||||
operator fun invoke(p1: P1, p2: P2, p3: P3): R
|
||||
}
|
||||
/** A function that takes 4 arguments. */
|
||||
public interface Function4<in P1, in P2, in P3, in P4, out R> : Function<R> {
|
||||
interface Function4<in P1, in P2, in P3, in P4, out R> : Function<R> {
|
||||
/** Invokes the function with the specified arguments. */
|
||||
public operator fun invoke(p1: P1, p2: P2, p3: P3, p4: P4): R
|
||||
operator fun invoke(p1: P1, p2: P2, p3: P3, p4: P4): R
|
||||
}
|
||||
/** A function that takes 5 arguments. */
|
||||
public interface Function5<in P1, in P2, in P3, in P4, in P5, out R> : Function<R> {
|
||||
interface Function5<in P1, in P2, in P3, in P4, in P5, out R> : Function<R> {
|
||||
/** Invokes the function with the specified arguments. */
|
||||
public operator fun invoke(p1: P1, p2: P2, p3: P3, p4: P4, p5: P5): R
|
||||
operator fun invoke(p1: P1, p2: P2, p3: P3, p4: P4, p5: P5): R
|
||||
}
|
||||
/** A function that takes 6 arguments. */
|
||||
public interface Function6<in P1, in P2, in P3, in P4, in P5, in P6, out R> : Function<R> {
|
||||
interface Function6<in P1, in P2, in P3, in P4, in P5, in P6, out R> : Function<R> {
|
||||
/** Invokes the function with the specified arguments. */
|
||||
public operator fun invoke(p1: P1, p2: P2, p3: P3, p4: P4, p5: P5, p6: P6): R
|
||||
operator fun invoke(p1: P1, p2: P2, p3: P3, p4: P4, p5: P5, p6: P6): R
|
||||
}
|
||||
/** A function that takes 7 arguments. */
|
||||
public interface Function7<in P1, in P2, in P3, in P4, in P5, in P6, in P7, out R> : Function<R> {
|
||||
interface Function7<in P1, in P2, in P3, in P4, in P5, in P6, in P7, out R> : Function<R> {
|
||||
/** Invokes the function with the specified arguments. */
|
||||
public operator fun invoke(p1: P1, p2: P2, p3: P3, p4: P4, p5: P5, p6: P6, p7: P7): R
|
||||
operator fun invoke(p1: P1, p2: P2, p3: P3, p4: P4, p5: P5, p6: P6, p7: P7): R
|
||||
}
|
||||
/** A function that takes 8 arguments. */
|
||||
public interface Function8<in P1, in P2, in P3, in P4, in P5, in P6, in P7, in P8, out R> : Function<R> {
|
||||
interface Function8<in P1, in P2, in P3, in P4, in P5, in P6, in P7, in P8, out R> : Function<R> {
|
||||
/** Invokes the function with the specified arguments. */
|
||||
public operator fun invoke(p1: P1, p2: P2, p3: P3, p4: P4, p5: P5, p6: P6, p7: P7, p8: P8): R
|
||||
operator fun invoke(p1: P1, p2: P2, p3: P3, p4: P4, p5: P5, p6: P6, p7: P7, p8: P8): R
|
||||
}
|
||||
/** A function that takes 9 arguments. */
|
||||
public interface Function9<in P1, in P2, in P3, in P4, in P5, in P6, in P7, in P8, in P9, out R> : Function<R> {
|
||||
interface Function9<in P1, in P2, in P3, in P4, in P5, in P6, in P7, in P8, in P9, out R> : Function<R> {
|
||||
/** Invokes the function with the specified arguments. */
|
||||
public operator fun invoke(p1: P1, p2: P2, p3: P3, p4: P4, p5: P5, p6: P6, p7: P7, p8: P8, p9: P9): R
|
||||
operator fun invoke(p1: P1, p2: P2, p3: P3, p4: P4, p5: P5, p6: P6, p7: P7, p8: P8, p9: P9): R
|
||||
}
|
||||
/** A function that takes 10 arguments. */
|
||||
public interface Function10<in P1, in P2, in P3, in P4, in P5, in P6, in P7, in P8, in P9, in P10, out R> : Function<R> {
|
||||
interface Function10<in P1, in P2, in P3, in P4, in P5, in P6, in P7, in P8, in P9, in P10, out R> : Function<R> {
|
||||
/** Invokes the function with the specified arguments. */
|
||||
public operator fun invoke(p1: P1, p2: P2, p3: P3, p4: P4, p5: P5, p6: P6, p7: P7, p8: P8, p9: P9, p10: P10): R
|
||||
operator fun invoke(p1: P1, p2: P2, p3: P3, p4: P4, p5: P5, p6: P6, p7: P7, p8: P8, p9: P9, p10: P10): R
|
||||
}
|
||||
/** A function that takes 11 arguments. */
|
||||
public interface Function11<in P1, in P2, in P3, in P4, in P5, in P6, in P7, in P8, in P9, in P10, in P11, out R> : Function<R> {
|
||||
interface Function11<in P1, in P2, in P3, in P4, in P5, in P6, in P7, in P8, in P9, in P10, in P11, out R> : Function<R> {
|
||||
/** Invokes the function with the specified arguments. */
|
||||
public operator fun invoke(p1: P1, p2: P2, p3: P3, p4: P4, p5: P5, p6: P6, p7: P7, p8: P8, p9: P9, p10: P10, p11: P11): R
|
||||
operator fun invoke(p1: P1, p2: P2, p3: P3, p4: P4, p5: P5, p6: P6, p7: P7, p8: P8, p9: P9, p10: P10, p11: P11): R
|
||||
}
|
||||
/** A function that takes 12 arguments. */
|
||||
public interface Function12<in P1, in P2, in P3, in P4, in P5, in P6, in P7, in P8, in P9, in P10, in P11, in P12, out R> : Function<R> {
|
||||
interface Function12<in P1, in P2, in P3, in P4, in P5, in P6, in P7, in P8, in P9, in P10, in P11, in P12, out R> : Function<R> {
|
||||
/** Invokes the function with the specified arguments. */
|
||||
public operator fun invoke(p1: P1, p2: P2, p3: P3, p4: P4, p5: P5, p6: P6, p7: P7, p8: P8, p9: P9, p10: P10, p11: P11, p12: P12): R
|
||||
operator fun invoke(p1: P1, p2: P2, p3: P3, p4: P4, p5: P5, p6: P6, p7: P7, p8: P8, p9: P9, p10: P10, p11: P11, p12: P12): R
|
||||
}
|
||||
/** A function that takes 13 arguments. */
|
||||
public interface Function13<in P1, in P2, in P3, in P4, in P5, in P6, in P7, in P8, in P9, in P10, in P11, in P12, in P13, out R> : Function<R> {
|
||||
interface Function13<in P1, in P2, in P3, in P4, in P5, in P6, in P7, in P8, in P9, in P10, in P11, in P12, in P13, out R> : Function<R> {
|
||||
/** Invokes the function with the specified arguments. */
|
||||
public operator fun invoke(p1: P1, p2: P2, p3: P3, p4: P4, p5: P5, p6: P6, p7: P7, p8: P8, p9: P9, p10: P10, p11: P11, p12: P12, p13: P13): R
|
||||
operator fun invoke(p1: P1, p2: P2, p3: P3, p4: P4, p5: P5, p6: P6, p7: P7, p8: P8, p9: P9, p10: P10, p11: P11, p12: P12, p13: P13): R
|
||||
}
|
||||
/** A function that takes 14 arguments. */
|
||||
public interface Function14<in P1, in P2, in P3, in P4, in P5, in P6, in P7, in P8, in P9, in P10, in P11, in P12, in P13, in P14, out R> : Function<R> {
|
||||
interface Function14<in P1, in P2, in P3, in P4, in P5, in P6, in P7, in P8, in P9, in P10, in P11, in P12, in P13, in P14, out R> : Function<R> {
|
||||
/** Invokes the function with the specified arguments. */
|
||||
public operator fun invoke(p1: P1, p2: P2, p3: P3, p4: P4, p5: P5, p6: P6, p7: P7, p8: P8, p9: P9, p10: P10, p11: P11, p12: P12, p13: P13, p14: P14): R
|
||||
operator fun invoke(p1: P1, p2: P2, p3: P3, p4: P4, p5: P5, p6: P6, p7: P7, p8: P8, p9: P9, p10: P10, p11: P11, p12: P12, p13: P13, p14: P14): R
|
||||
}
|
||||
/** A function that takes 15 arguments. */
|
||||
public interface Function15<in P1, in P2, in P3, in P4, in P5, in P6, in P7, in P8, in P9, in P10, in P11, in P12, in P13, in P14, in P15, out R> : Function<R> {
|
||||
interface Function15<in P1, in P2, in P3, in P4, in P5, in P6, in P7, in P8, in P9, in P10, in P11, in P12, in P13, in P14, in P15, out R> : Function<R> {
|
||||
/** Invokes the function with the specified arguments. */
|
||||
public operator fun invoke(p1: P1, p2: P2, p3: P3, p4: P4, p5: P5, p6: P6, p7: P7, p8: P8, p9: P9, p10: P10, p11: P11, p12: P12, p13: P13, p14: P14, p15: P15): R
|
||||
operator fun invoke(p1: P1, p2: P2, p3: P3, p4: P4, p5: P5, p6: P6, p7: P7, p8: P8, p9: P9, p10: P10, p11: P11, p12: P12, p13: P13, p14: P14, p15: P15): R
|
||||
}
|
||||
/** A function that takes 16 arguments. */
|
||||
public interface Function16<in P1, in P2, in P3, in P4, in P5, in P6, in P7, in P8, in P9, in P10, in P11, in P12, in P13, in P14, in P15, in P16, out R> : Function<R> {
|
||||
interface Function16<in P1, in P2, in P3, in P4, in P5, in P6, in P7, in P8, in P9, in P10, in P11, in P12, in P13, in P14, in P15, in P16, out R> : Function<R> {
|
||||
/** Invokes the function with the specified arguments. */
|
||||
public operator fun invoke(p1: P1, p2: P2, p3: P3, p4: P4, p5: P5, p6: P6, p7: P7, p8: P8, p9: P9, p10: P10, p11: P11, p12: P12, p13: P13, p14: P14, p15: P15, p16: P16): R
|
||||
operator fun invoke(p1: P1, p2: P2, p3: P3, p4: P4, p5: P5, p6: P6, p7: P7, p8: P8, p9: P9, p10: P10, p11: P11, p12: P12, p13: P13, p14: P14, p15: P15, p16: P16): R
|
||||
}
|
||||
/** A function that takes 17 arguments. */
|
||||
public interface Function17<in P1, in P2, in P3, in P4, in P5, in P6, in P7, in P8, in P9, in P10, in P11, in P12, in P13, in P14, in P15, in P16, in P17, out R> : Function<R> {
|
||||
interface Function17<in P1, in P2, in P3, in P4, in P5, in P6, in P7, in P8, in P9, in P10, in P11, in P12, in P13, in P14, in P15, in P16, in P17, out R> : Function<R> {
|
||||
/** Invokes the function with the specified arguments. */
|
||||
public operator fun invoke(p1: P1, p2: P2, p3: P3, p4: P4, p5: P5, p6: P6, p7: P7, p8: P8, p9: P9, p10: P10, p11: P11, p12: P12, p13: P13, p14: P14, p15: P15, p16: P16, p17: P17): R
|
||||
operator fun invoke(p1: P1, p2: P2, p3: P3, p4: P4, p5: P5, p6: P6, p7: P7, p8: P8, p9: P9, p10: P10, p11: P11, p12: P12, p13: P13, p14: P14, p15: P15, p16: P16, p17: P17): R
|
||||
}
|
||||
/** A function that takes 18 arguments. */
|
||||
public interface Function18<in P1, in P2, in P3, in P4, in P5, in P6, in P7, in P8, in P9, in P10, in P11, in P12, in P13, in P14, in P15, in P16, in P17, in P18, out R> : Function<R> {
|
||||
interface Function18<in P1, in P2, in P3, in P4, in P5, in P6, in P7, in P8, in P9, in P10, in P11, in P12, in P13, in P14, in P15, in P16, in P17, in P18, out R> : Function<R> {
|
||||
/** Invokes the function with the specified arguments. */
|
||||
public operator fun invoke(p1: P1, p2: P2, p3: P3, p4: P4, p5: P5, p6: P6, p7: P7, p8: P8, p9: P9, p10: P10, p11: P11, p12: P12, p13: P13, p14: P14, p15: P15, p16: P16, p17: P17, p18: P18): R
|
||||
operator fun invoke(p1: P1, p2: P2, p3: P3, p4: P4, p5: P5, p6: P6, p7: P7, p8: P8, p9: P9, p10: P10, p11: P11, p12: P12, p13: P13, p14: P14, p15: P15, p16: P16, p17: P17, p18: P18): R
|
||||
}
|
||||
/** A function that takes 19 arguments. */
|
||||
public interface Function19<in P1, in P2, in P3, in P4, in P5, in P6, in P7, in P8, in P9, in P10, in P11, in P12, in P13, in P14, in P15, in P16, in P17, in P18, in P19, out R> : Function<R> {
|
||||
interface Function19<in P1, in P2, in P3, in P4, in P5, in P6, in P7, in P8, in P9, in P10, in P11, in P12, in P13, in P14, in P15, in P16, in P17, in P18, in P19, out R> : Function<R> {
|
||||
/** Invokes the function with the specified arguments. */
|
||||
public operator fun invoke(p1: P1, p2: P2, p3: P3, p4: P4, p5: P5, p6: P6, p7: P7, p8: P8, p9: P9, p10: P10, p11: P11, p12: P12, p13: P13, p14: P14, p15: P15, p16: P16, p17: P17, p18: P18, p19: P19): R
|
||||
operator fun invoke(p1: P1, p2: P2, p3: P3, p4: P4, p5: P5, p6: P6, p7: P7, p8: P8, p9: P9, p10: P10, p11: P11, p12: P12, p13: P13, p14: P14, p15: P15, p16: P16, p17: P17, p18: P18, p19: P19): R
|
||||
}
|
||||
/** A function that takes 20 arguments. */
|
||||
public interface Function20<in P1, in P2, in P3, in P4, in P5, in P6, in P7, in P8, in P9, in P10, in P11, in P12, in P13, in P14, in P15, in P16, in P17, in P18, in P19, in P20, out R> : Function<R> {
|
||||
interface Function20<in P1, in P2, in P3, in P4, in P5, in P6, in P7, in P8, in P9, in P10, in P11, in P12, in P13, in P14, in P15, in P16, in P17, in P18, in P19, in P20, out R> : Function<R> {
|
||||
/** Invokes the function with the specified arguments. */
|
||||
public operator fun invoke(p1: P1, p2: P2, p3: P3, p4: P4, p5: P5, p6: P6, p7: P7, p8: P8, p9: P9, p10: P10, p11: P11, p12: P12, p13: P13, p14: P14, p15: P15, p16: P16, p17: P17, p18: P18, p19: P19, p20: P20): R
|
||||
operator fun invoke(p1: P1, p2: P2, p3: P3, p4: P4, p5: P5, p6: P6, p7: P7, p8: P8, p9: P9, p10: P10, p11: P11, p12: P12, p13: P13, p14: P14, p15: P15, p16: P16, p17: P17, p18: P18, p19: P19, p20: P20): R
|
||||
}
|
||||
/** A function that takes 21 arguments. */
|
||||
public interface Function21<in P1, in P2, in P3, in P4, in P5, in P6, in P7, in P8, in P9, in P10, in P11, in P12, in P13, in P14, in P15, in P16, in P17, in P18, in P19, in P20, in P21, out R> : Function<R> {
|
||||
interface Function21<in P1, in P2, in P3, in P4, in P5, in P6, in P7, in P8, in P9, in P10, in P11, in P12, in P13, in P14, in P15, in P16, in P17, in P18, in P19, in P20, in P21, out R> : Function<R> {
|
||||
/** Invokes the function with the specified arguments. */
|
||||
public operator fun invoke(p1: P1, p2: P2, p3: P3, p4: P4, p5: P5, p6: P6, p7: P7, p8: P8, p9: P9, p10: P10, p11: P11, p12: P12, p13: P13, p14: P14, p15: P15, p16: P16, p17: P17, p18: P18, p19: P19, p20: P20, p21: P21): R
|
||||
operator fun invoke(p1: P1, p2: P2, p3: P3, p4: P4, p5: P5, p6: P6, p7: P7, p8: P8, p9: P9, p10: P10, p11: P11, p12: P12, p13: P13, p14: P14, p15: P15, p16: P16, p17: P17, p18: P18, p19: P19, p20: P20, p21: P21): R
|
||||
}
|
||||
/** A function that takes 22 arguments. */
|
||||
public interface Function22<in P1, in P2, in P3, in P4, in P5, in P6, in P7, in P8, in P9, in P10, in P11, in P12, in P13, in P14, in P15, in P16, in P17, in P18, in P19, in P20, in P21, in P22, out R> : Function<R> {
|
||||
interface Function22<in P1, in P2, in P3, in P4, in P5, in P6, in P7, in P8, in P9, in P10, in P11, in P12, in P13, in P14, in P15, in P16, in P17, in P18, in P19, in P20, in P21, in P22, out R> : Function<R> {
|
||||
/** Invokes the function with the specified arguments. */
|
||||
public operator fun invoke(p1: P1, p2: P2, p3: P3, p4: P4, p5: P5, p6: P6, p7: P7, p8: P8, p9: P9, p10: P10, p11: P11, p12: P12, p13: P13, p14: P14, p15: P15, p16: P16, p17: P17, p18: P18, p19: P19, p20: P20, p21: P21, p22: P22): R
|
||||
operator fun invoke(p1: P1, p2: P2, p3: P3, p4: P4, p5: P5, p6: P6, p7: P7, p8: P8, p9: P9, p10: P10, p11: P11, p12: P12, p13: P13, p14: P14, p15: P15, p16: P16, p17: P17, p18: P18, p19: P19, p20: P20, p21: P21, p22: P22): R
|
||||
}
|
||||
|
||||
@@ -22,4 +22,4 @@ private class ArrayIterator<T>(val array: Array<T>) : Iterator<T> {
|
||||
override fun next() = array[index++]
|
||||
}
|
||||
|
||||
public fun <T> iterator(array: Array<T>): Iterator<T> = ArrayIterator(array)
|
||||
fun <T> iterator(array: Array<T>): Iterator<T> = ArrayIterator(array)
|
||||
|
||||
@@ -66,11 +66,11 @@ private class ArrayBooleanIterator(private val array: BooleanArray) : BooleanIte
|
||||
override fun nextBoolean() = array[index++]
|
||||
}
|
||||
|
||||
public fun iterator(array: ByteArray): ByteIterator = ArrayByteIterator(array)
|
||||
public fun iterator(array: CharArray): CharIterator = ArrayCharIterator(array)
|
||||
public fun iterator(array: ShortArray): ShortIterator = ArrayShortIterator(array)
|
||||
public fun iterator(array: IntArray): IntIterator = ArrayIntIterator(array)
|
||||
public fun iterator(array: LongArray): LongIterator = ArrayLongIterator(array)
|
||||
public fun iterator(array: FloatArray): FloatIterator = ArrayFloatIterator(array)
|
||||
public fun iterator(array: DoubleArray): DoubleIterator = ArrayDoubleIterator(array)
|
||||
public fun iterator(array: BooleanArray): BooleanIterator = ArrayBooleanIterator(array)
|
||||
fun iterator(array: ByteArray): ByteIterator = ArrayByteIterator(array)
|
||||
fun iterator(array: CharArray): CharIterator = ArrayCharIterator(array)
|
||||
fun iterator(array: ShortArray): ShortIterator = ArrayShortIterator(array)
|
||||
fun iterator(array: IntArray): IntIterator = ArrayIntIterator(array)
|
||||
fun iterator(array: LongArray): LongIterator = ArrayLongIterator(array)
|
||||
fun iterator(array: FloatArray): FloatIterator = ArrayFloatIterator(array)
|
||||
fun iterator(array: DoubleArray): DoubleIterator = ArrayDoubleIterator(array)
|
||||
fun iterator(array: BooleanArray): BooleanIterator = ArrayBooleanIterator(array)
|
||||
|
||||
@@ -19,5 +19,5 @@ package kotlin.jvm.internal
|
||||
import kotlin.reflect.KDeclarationContainer
|
||||
|
||||
interface ClassBasedDeclarationContainer : KDeclarationContainer {
|
||||
public val jClass: Class<*>
|
||||
val jClass: Class<*>
|
||||
}
|
||||
|
||||
@@ -20,7 +20,7 @@ import kotlin.reflect.KCallable
|
||||
import kotlin.reflect.KClass
|
||||
import kotlin.reflect.KFunction
|
||||
|
||||
public class ClassReference(override val jClass: Class<*>) : KClass<Any>, ClassBasedDeclarationContainer {
|
||||
class ClassReference(override val jClass: Class<*>) : KClass<Any>, ClassBasedDeclarationContainer {
|
||||
override val simpleName: String?
|
||||
get() = error()
|
||||
|
||||
|
||||
@@ -16,9 +16,9 @@
|
||||
|
||||
package kotlin.jvm.internal
|
||||
|
||||
public abstract class Lambda(private val arity: Int) : FunctionImpl() {
|
||||
abstract class Lambda(private val arity: Int) : FunctionImpl() {
|
||||
override fun getArity() = arity
|
||||
|
||||
@Suppress("PLATFORM_CLASS_MAPPED_TO_KOTLIN")
|
||||
override fun toString() = "${(this as Object).getClass().getGenericInterfaces()[0]}"
|
||||
override fun toString() = "${(this as Object).`class`.genericInterfaces[0]}"
|
||||
}
|
||||
|
||||
@@ -54,12 +54,12 @@ private object ByteCompanionObject {
|
||||
|
||||
|
||||
private object CharCompanionObject {
|
||||
public const val MIN_HIGH_SURROGATE: Char = '\uD800'
|
||||
public const val MAX_HIGH_SURROGATE: Char = '\uDBFF'
|
||||
public const val MIN_LOW_SURROGATE: Char = '\uDC00'
|
||||
public const val MAX_LOW_SURROGATE: Char = '\uDFFF'
|
||||
public const val MIN_SURROGATE: Char = MIN_HIGH_SURROGATE
|
||||
public const val MAX_SURROGATE: Char = MAX_LOW_SURROGATE
|
||||
const val MIN_HIGH_SURROGATE: Char = '\uD800'
|
||||
const val MAX_HIGH_SURROGATE: Char = '\uDBFF'
|
||||
const val MIN_LOW_SURROGATE: Char = '\uDC00'
|
||||
const val MAX_LOW_SURROGATE: Char = '\uDFFF'
|
||||
const val MIN_SURROGATE: Char = MIN_HIGH_SURROGATE
|
||||
const val MAX_SURROGATE: Char = MAX_LOW_SURROGATE
|
||||
}
|
||||
|
||||
private object StringCompanionObject {}
|
||||
|
||||
@@ -16,7 +16,7 @@
|
||||
|
||||
package kotlin.jvm.internal
|
||||
|
||||
public abstract class PrimitiveSpreadBuilder<T : Any>(private val size: Int) {
|
||||
abstract class PrimitiveSpreadBuilder<T : Any>(private val size: Int) {
|
||||
abstract protected fun T.getSize(): Int
|
||||
|
||||
protected var position: Int = 0
|
||||
@@ -24,7 +24,7 @@ public abstract class PrimitiveSpreadBuilder<T : Any>(private val size: Int) {
|
||||
@Suppress("CAST_NEVER_SUCCEEDS")
|
||||
private val spreads: Array<T?> = arrayOfNulls<Any>(size) as Array<T?>
|
||||
|
||||
public fun addSpread(spreadArgument: T) {
|
||||
fun addSpread(spreadArgument: T) {
|
||||
spreads[position++] = spreadArgument
|
||||
}
|
||||
|
||||
@@ -60,90 +60,90 @@ public abstract class PrimitiveSpreadBuilder<T : Any>(private val size: Int) {
|
||||
}
|
||||
}
|
||||
|
||||
public class ByteSpreadBuilder(size: Int) : PrimitiveSpreadBuilder<ByteArray>(size) {
|
||||
class ByteSpreadBuilder(size: Int) : PrimitiveSpreadBuilder<ByteArray>(size) {
|
||||
private val values: ByteArray = ByteArray(size)
|
||||
override fun ByteArray.getSize(): Int = this.size
|
||||
|
||||
public fun add(value: Byte) {
|
||||
fun add(value: Byte) {
|
||||
values[position++] = value
|
||||
}
|
||||
|
||||
public fun toArray(): ByteArray = toArray(values, ByteArray(size()))
|
||||
fun toArray(): ByteArray = toArray(values, ByteArray(size()))
|
||||
}
|
||||
|
||||
public class CharSpreadBuilder(size: Int) : PrimitiveSpreadBuilder<CharArray>(size) {
|
||||
class CharSpreadBuilder(size: Int) : PrimitiveSpreadBuilder<CharArray>(size) {
|
||||
private val values: CharArray = CharArray(size)
|
||||
override fun CharArray.getSize(): Int = this.size
|
||||
|
||||
public fun add(value: Char) {
|
||||
fun add(value: Char) {
|
||||
values[position++] = value
|
||||
}
|
||||
|
||||
public fun toArray(): CharArray = toArray(values, CharArray(size()))
|
||||
fun toArray(): CharArray = toArray(values, CharArray(size()))
|
||||
}
|
||||
|
||||
public class DoubleSpreadBuilder(size: Int) : PrimitiveSpreadBuilder<DoubleArray>(size) {
|
||||
class DoubleSpreadBuilder(size: Int) : PrimitiveSpreadBuilder<DoubleArray>(size) {
|
||||
private val values: DoubleArray = DoubleArray(size)
|
||||
override fun DoubleArray.getSize(): Int = this.size
|
||||
|
||||
public fun add(value: Double) {
|
||||
fun add(value: Double) {
|
||||
values[position++] = value
|
||||
}
|
||||
|
||||
public fun toArray(): DoubleArray = toArray(values, DoubleArray(size()))
|
||||
fun toArray(): DoubleArray = toArray(values, DoubleArray(size()))
|
||||
}
|
||||
|
||||
public class FloatSpreadBuilder(size: Int) : PrimitiveSpreadBuilder<FloatArray>(size) {
|
||||
class FloatSpreadBuilder(size: Int) : PrimitiveSpreadBuilder<FloatArray>(size) {
|
||||
private val values: FloatArray = FloatArray(size)
|
||||
override fun FloatArray.getSize(): Int = this.size
|
||||
|
||||
public fun add(value: Float) {
|
||||
fun add(value: Float) {
|
||||
values[position++] = value
|
||||
}
|
||||
|
||||
public fun toArray(): FloatArray = toArray(values, FloatArray(size()))
|
||||
fun toArray(): FloatArray = toArray(values, FloatArray(size()))
|
||||
}
|
||||
|
||||
public class IntSpreadBuilder(size: Int) : PrimitiveSpreadBuilder<IntArray>(size) {
|
||||
class IntSpreadBuilder(size: Int) : PrimitiveSpreadBuilder<IntArray>(size) {
|
||||
private val values: IntArray = IntArray(size)
|
||||
override fun IntArray.getSize(): Int = this.size
|
||||
|
||||
public fun add(value: Int) {
|
||||
fun add(value: Int) {
|
||||
values[position++] = value
|
||||
}
|
||||
|
||||
public fun toArray(): IntArray = toArray(values, IntArray(size()))
|
||||
fun toArray(): IntArray = toArray(values, IntArray(size()))
|
||||
}
|
||||
|
||||
public class LongSpreadBuilder(size: Int) : PrimitiveSpreadBuilder<LongArray>(size) {
|
||||
class LongSpreadBuilder(size: Int) : PrimitiveSpreadBuilder<LongArray>(size) {
|
||||
private val values: LongArray = LongArray(size)
|
||||
override fun LongArray.getSize(): Int = this.size
|
||||
|
||||
public fun add(value: Long) {
|
||||
fun add(value: Long) {
|
||||
values[position++] = value
|
||||
}
|
||||
|
||||
public fun toArray(): LongArray = toArray(values, LongArray(size()))
|
||||
fun toArray(): LongArray = toArray(values, LongArray(size()))
|
||||
}
|
||||
|
||||
public class ShortSpreadBuilder(size: Int) : PrimitiveSpreadBuilder<ShortArray>(size) {
|
||||
class ShortSpreadBuilder(size: Int) : PrimitiveSpreadBuilder<ShortArray>(size) {
|
||||
private val values: ShortArray = ShortArray(size)
|
||||
override fun ShortArray.getSize(): Int = this.size
|
||||
|
||||
public fun add(value: Short) {
|
||||
fun add(value: Short) {
|
||||
values[position++] = value
|
||||
}
|
||||
|
||||
public fun toArray(): ShortArray = toArray(values, ShortArray(size()))
|
||||
fun toArray(): ShortArray = toArray(values, ShortArray(size()))
|
||||
}
|
||||
|
||||
public class BooleanSpreadBuilder(size: Int) : PrimitiveSpreadBuilder<BooleanArray>(size) {
|
||||
class BooleanSpreadBuilder(size: Int) : PrimitiveSpreadBuilder<BooleanArray>(size) {
|
||||
private val values: BooleanArray = BooleanArray(size)
|
||||
override fun BooleanArray.getSize(): Int = this.size
|
||||
|
||||
public fun add(value: Boolean) {
|
||||
fun add(value: Boolean) {
|
||||
values[position++] = value
|
||||
}
|
||||
|
||||
public fun toArray(): BooleanArray = toArray(values, BooleanArray(size()))
|
||||
fun toArray(): BooleanArray = toArray(values, BooleanArray(size()))
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user