Move 23 function classes to package kotlin.jvm.functions, drop KFunction*

This commit is contained in:
Alexander Udalov
2015-04-16 17:37:07 +03:00
parent f6178ad7dd
commit b574c1d205
8 changed files with 31 additions and 337 deletions
+1 -90
View File
@@ -720,96 +720,7 @@ public interface FloatingPointConstants</*0*/ T> {
public abstract fun <get-POSITIVE_INFINITY>(): T
}
public interface Function0</*0*/ out R> {
public abstract fun invoke(): R
}
public interface Function1</*0*/ in P1, /*1*/ out R> {
public abstract fun invoke(/*0*/ p1: P1): R
}
public interface Function10</*0*/ in P1, /*1*/ in P2, /*2*/ in P3, /*3*/ in P4, /*4*/ in P5, /*5*/ in P6, /*6*/ in P7, /*7*/ in P8, /*8*/ in P9, /*9*/ in P10, /*10*/ out R> {
public abstract fun invoke(/*0*/ p1: P1, /*1*/ p2: P2, /*2*/ p3: P3, /*3*/ p4: P4, /*4*/ p5: P5, /*5*/ p6: P6, /*6*/ p7: P7, /*7*/ p8: P8, /*8*/ p9: P9, /*9*/ p10: P10): R
}
public interface Function11</*0*/ in P1, /*1*/ in P2, /*2*/ in P3, /*3*/ in P4, /*4*/ in P5, /*5*/ in P6, /*6*/ in P7, /*7*/ in P8, /*8*/ in P9, /*9*/ in P10, /*10*/ in P11, /*11*/ out R> {
public abstract fun invoke(/*0*/ p1: P1, /*1*/ p2: P2, /*2*/ p3: P3, /*3*/ p4: P4, /*4*/ p5: P5, /*5*/ p6: P6, /*6*/ p7: P7, /*7*/ p8: P8, /*8*/ p9: P9, /*9*/ p10: P10, /*10*/ p11: P11): R
}
public interface Function12</*0*/ in P1, /*1*/ in P2, /*2*/ in P3, /*3*/ in P4, /*4*/ in P5, /*5*/ in P6, /*6*/ in P7, /*7*/ in P8, /*8*/ in P9, /*9*/ in P10, /*10*/ in P11, /*11*/ in P12, /*12*/ out R> {
public abstract fun invoke(/*0*/ p1: P1, /*1*/ p2: P2, /*2*/ p3: P3, /*3*/ p4: P4, /*4*/ p5: P5, /*5*/ p6: P6, /*6*/ p7: P7, /*7*/ p8: P8, /*8*/ p9: P9, /*9*/ p10: P10, /*10*/ p11: P11, /*11*/ p12: P12): R
}
public interface Function13</*0*/ in P1, /*1*/ in P2, /*2*/ in P3, /*3*/ in P4, /*4*/ in P5, /*5*/ in P6, /*6*/ in P7, /*7*/ in P8, /*8*/ in P9, /*9*/ in P10, /*10*/ in P11, /*11*/ in P12, /*12*/ in P13, /*13*/ out R> {
public abstract fun invoke(/*0*/ p1: P1, /*1*/ p2: P2, /*2*/ p3: P3, /*3*/ p4: P4, /*4*/ p5: P5, /*5*/ p6: P6, /*6*/ p7: P7, /*7*/ p8: P8, /*8*/ p9: P9, /*9*/ p10: P10, /*10*/ p11: P11, /*11*/ p12: P12, /*12*/ p13: P13): R
}
public interface Function14</*0*/ in P1, /*1*/ in P2, /*2*/ in P3, /*3*/ in P4, /*4*/ in P5, /*5*/ in P6, /*6*/ in P7, /*7*/ in P8, /*8*/ in P9, /*9*/ in P10, /*10*/ in P11, /*11*/ in P12, /*12*/ in P13, /*13*/ in P14, /*14*/ out R> {
public abstract fun invoke(/*0*/ p1: P1, /*1*/ p2: P2, /*2*/ p3: P3, /*3*/ p4: P4, /*4*/ p5: P5, /*5*/ p6: P6, /*6*/ p7: P7, /*7*/ p8: P8, /*8*/ p9: P9, /*9*/ p10: P10, /*10*/ p11: P11, /*11*/ p12: P12, /*12*/ p13: P13, /*13*/ p14: P14): R
}
public interface Function15</*0*/ in P1, /*1*/ in P2, /*2*/ in P3, /*3*/ in P4, /*4*/ in P5, /*5*/ in P6, /*6*/ in P7, /*7*/ in P8, /*8*/ in P9, /*9*/ in P10, /*10*/ in P11, /*11*/ in P12, /*12*/ in P13, /*13*/ in P14, /*14*/ in P15, /*15*/ out R> {
public abstract fun invoke(/*0*/ p1: P1, /*1*/ p2: P2, /*2*/ p3: P3, /*3*/ p4: P4, /*4*/ p5: P5, /*5*/ p6: P6, /*6*/ p7: P7, /*7*/ p8: P8, /*8*/ p9: P9, /*9*/ p10: P10, /*10*/ p11: P11, /*11*/ p12: P12, /*12*/ p13: P13, /*13*/ p14: P14, /*14*/ p15: P15): R
}
public interface Function16</*0*/ in P1, /*1*/ in P2, /*2*/ in P3, /*3*/ in P4, /*4*/ in P5, /*5*/ in P6, /*6*/ in P7, /*7*/ in P8, /*8*/ in P9, /*9*/ in P10, /*10*/ in P11, /*11*/ in P12, /*12*/ in P13, /*13*/ in P14, /*14*/ in P15, /*15*/ in P16, /*16*/ out R> {
public abstract fun invoke(/*0*/ p1: P1, /*1*/ p2: P2, /*2*/ p3: P3, /*3*/ p4: P4, /*4*/ p5: P5, /*5*/ p6: P6, /*6*/ p7: P7, /*7*/ p8: P8, /*8*/ p9: P9, /*9*/ p10: P10, /*10*/ p11: P11, /*11*/ p12: P12, /*12*/ p13: P13, /*13*/ p14: P14, /*14*/ p15: P15, /*15*/ p16: P16): R
}
public interface Function17</*0*/ in P1, /*1*/ in P2, /*2*/ in P3, /*3*/ in P4, /*4*/ in P5, /*5*/ in P6, /*6*/ in P7, /*7*/ in P8, /*8*/ in P9, /*9*/ in P10, /*10*/ in P11, /*11*/ in P12, /*12*/ in P13, /*13*/ in P14, /*14*/ in P15, /*15*/ in P16, /*16*/ in P17, /*17*/ out R> {
public abstract fun invoke(/*0*/ p1: P1, /*1*/ p2: P2, /*2*/ p3: P3, /*3*/ p4: P4, /*4*/ p5: P5, /*5*/ p6: P6, /*6*/ p7: P7, /*7*/ p8: P8, /*8*/ p9: P9, /*9*/ p10: P10, /*10*/ p11: P11, /*11*/ p12: P12, /*12*/ p13: P13, /*13*/ p14: P14, /*14*/ p15: P15, /*15*/ p16: P16, /*16*/ p17: P17): R
}
public interface Function18</*0*/ in P1, /*1*/ in P2, /*2*/ in P3, /*3*/ in P4, /*4*/ in P5, /*5*/ in P6, /*6*/ in P7, /*7*/ in P8, /*8*/ in P9, /*9*/ in P10, /*10*/ in P11, /*11*/ in P12, /*12*/ in P13, /*13*/ in P14, /*14*/ in P15, /*15*/ in P16, /*16*/ in P17, /*17*/ in P18, /*18*/ out R> {
public abstract fun invoke(/*0*/ p1: P1, /*1*/ p2: P2, /*2*/ p3: P3, /*3*/ p4: P4, /*4*/ p5: P5, /*5*/ p6: P6, /*6*/ p7: P7, /*7*/ p8: P8, /*8*/ p9: P9, /*9*/ p10: P10, /*10*/ p11: P11, /*11*/ p12: P12, /*12*/ p13: P13, /*13*/ p14: P14, /*14*/ p15: P15, /*15*/ p16: P16, /*16*/ p17: P17, /*17*/ p18: P18): R
}
public interface Function19</*0*/ in P1, /*1*/ in P2, /*2*/ in P3, /*3*/ in P4, /*4*/ in P5, /*5*/ in P6, /*6*/ in P7, /*7*/ in P8, /*8*/ in P9, /*9*/ in P10, /*10*/ in P11, /*11*/ in P12, /*12*/ in P13, /*13*/ in P14, /*14*/ in P15, /*15*/ in P16, /*16*/ in P17, /*17*/ in P18, /*18*/ in P19, /*19*/ out R> {
public abstract fun invoke(/*0*/ p1: P1, /*1*/ p2: P2, /*2*/ p3: P3, /*3*/ p4: P4, /*4*/ p5: P5, /*5*/ p6: P6, /*6*/ p7: P7, /*7*/ p8: P8, /*8*/ p9: P9, /*9*/ p10: P10, /*10*/ p11: P11, /*11*/ p12: P12, /*12*/ p13: P13, /*13*/ p14: P14, /*14*/ p15: P15, /*15*/ p16: P16, /*16*/ p17: P17, /*17*/ p18: P18, /*18*/ p19: P19): R
}
public interface Function2</*0*/ in P1, /*1*/ in P2, /*2*/ out R> {
public abstract fun invoke(/*0*/ p1: P1, /*1*/ p2: P2): R
}
public interface Function20</*0*/ in P1, /*1*/ in P2, /*2*/ in P3, /*3*/ in P4, /*4*/ in P5, /*5*/ in P6, /*6*/ in P7, /*7*/ in P8, /*8*/ in P9, /*9*/ in P10, /*10*/ in P11, /*11*/ in P12, /*12*/ in P13, /*13*/ in P14, /*14*/ in P15, /*15*/ in P16, /*16*/ in P17, /*17*/ in P18, /*18*/ in P19, /*19*/ in P20, /*20*/ out R> {
public abstract fun invoke(/*0*/ p1: P1, /*1*/ p2: P2, /*2*/ p3: P3, /*3*/ p4: P4, /*4*/ p5: P5, /*5*/ p6: P6, /*6*/ p7: P7, /*7*/ p8: P8, /*8*/ p9: P9, /*9*/ p10: P10, /*10*/ p11: P11, /*11*/ p12: P12, /*12*/ p13: P13, /*13*/ p14: P14, /*14*/ p15: P15, /*15*/ p16: P16, /*16*/ p17: P17, /*17*/ p18: P18, /*18*/ p19: P19, /*19*/ p20: P20): R
}
public interface Function21</*0*/ in P1, /*1*/ in P2, /*2*/ in P3, /*3*/ in P4, /*4*/ in P5, /*5*/ in P6, /*6*/ in P7, /*7*/ in P8, /*8*/ in P9, /*9*/ in P10, /*10*/ in P11, /*11*/ in P12, /*12*/ in P13, /*13*/ in P14, /*14*/ in P15, /*15*/ in P16, /*16*/ in P17, /*17*/ in P18, /*18*/ in P19, /*19*/ in P20, /*20*/ in P21, /*21*/ out R> {
public abstract fun invoke(/*0*/ p1: P1, /*1*/ p2: P2, /*2*/ p3: P3, /*3*/ p4: P4, /*4*/ p5: P5, /*5*/ p6: P6, /*6*/ p7: P7, /*7*/ p8: P8, /*8*/ p9: P9, /*9*/ p10: P10, /*10*/ p11: P11, /*11*/ p12: P12, /*12*/ p13: P13, /*13*/ p14: P14, /*14*/ p15: P15, /*15*/ p16: P16, /*16*/ p17: P17, /*17*/ p18: P18, /*18*/ p19: P19, /*19*/ p20: P20, /*20*/ p21: P21): R
}
public interface Function22</*0*/ in P1, /*1*/ in P2, /*2*/ in P3, /*3*/ in P4, /*4*/ in P5, /*5*/ in P6, /*6*/ in P7, /*7*/ in P8, /*8*/ in P9, /*9*/ in P10, /*10*/ in P11, /*11*/ in P12, /*12*/ in P13, /*13*/ in P14, /*14*/ in P15, /*15*/ in P16, /*16*/ in P17, /*17*/ in P18, /*18*/ in P19, /*19*/ in P20, /*20*/ in P21, /*21*/ in P22, /*22*/ out R> {
public abstract fun invoke(/*0*/ p1: P1, /*1*/ p2: P2, /*2*/ p3: P3, /*3*/ p4: P4, /*4*/ p5: P5, /*5*/ p6: P6, /*6*/ p7: P7, /*7*/ p8: P8, /*8*/ p9: P9, /*9*/ p10: P10, /*10*/ p11: P11, /*11*/ p12: P12, /*12*/ p13: P13, /*13*/ p14: P14, /*14*/ p15: P15, /*15*/ p16: P16, /*16*/ p17: P17, /*17*/ p18: P18, /*18*/ p19: P19, /*19*/ p20: P20, /*20*/ p21: P21, /*21*/ p22: P22): R
}
public interface Function3</*0*/ in P1, /*1*/ in P2, /*2*/ in P3, /*3*/ out R> {
public abstract fun invoke(/*0*/ p1: P1, /*1*/ p2: P2, /*2*/ p3: P3): R
}
public interface Function4</*0*/ in P1, /*1*/ in P2, /*2*/ in P3, /*3*/ in P4, /*4*/ out R> {
public abstract fun invoke(/*0*/ p1: P1, /*1*/ p2: P2, /*2*/ p3: P3, /*3*/ p4: P4): R
}
public interface Function5</*0*/ in P1, /*1*/ in P2, /*2*/ in P3, /*3*/ in P4, /*4*/ in P5, /*5*/ out R> {
public abstract fun invoke(/*0*/ p1: P1, /*1*/ p2: P2, /*2*/ p3: P3, /*3*/ p4: P4, /*4*/ p5: P5): R
}
public interface Function6</*0*/ in P1, /*1*/ in P2, /*2*/ in P3, /*3*/ in P4, /*4*/ in P5, /*5*/ in P6, /*6*/ out R> {
public abstract fun invoke(/*0*/ p1: P1, /*1*/ p2: P2, /*2*/ p3: P3, /*3*/ p4: P4, /*4*/ p5: P5, /*5*/ p6: P6): R
}
public interface Function7</*0*/ in P1, /*1*/ in P2, /*2*/ in P3, /*3*/ in P4, /*4*/ in P5, /*5*/ in P6, /*6*/ in P7, /*7*/ out R> {
public abstract fun invoke(/*0*/ p1: P1, /*1*/ p2: P2, /*2*/ p3: P3, /*3*/ p4: P4, /*4*/ p5: P5, /*5*/ p6: P6, /*6*/ p7: P7): R
}
public interface Function8</*0*/ in P1, /*1*/ in P2, /*2*/ in P3, /*3*/ in P4, /*4*/ in P5, /*5*/ in P6, /*6*/ in P7, /*7*/ in P8, /*8*/ out R> {
public abstract fun invoke(/*0*/ p1: P1, /*1*/ p2: P2, /*2*/ p3: P3, /*3*/ p4: P4, /*4*/ p5: P5, /*5*/ p6: P6, /*6*/ p7: P7, /*7*/ p8: P8): R
}
public interface Function9</*0*/ in P1, /*1*/ in P2, /*2*/ in P3, /*3*/ in P4, /*4*/ in P5, /*5*/ in P6, /*6*/ in P7, /*7*/ in P8, /*8*/ in P9, /*9*/ out R> {
public abstract fun invoke(/*0*/ p1: P1, /*1*/ p2: P2, /*2*/ p3: P3, /*3*/ p4: P4, /*4*/ p5: P5, /*5*/ p6: P6, /*6*/ p7: P7, /*7*/ p8: P8, /*8*/ p9: P9): R
public interface Function</*0*/ out R> {
}
public final enum class InlineOption : kotlin.Enum<kotlin.InlineOption> {
@@ -1,66 +0,0 @@
/*
* Copyright 2010-2015 JetBrains s.r.o.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
// Auto-generated file. DO NOT EDIT!
package kotlin.reflect
/** An extension function with introspection capabilities that takes 0 arguments. */
public interface KExtensionFunction0<in T, out R> : ExtensionFunction0<T, R>
/** An extension function with introspection capabilities that takes 1 argument. */
public interface KExtensionFunction1<in T, in P1, out R> : ExtensionFunction1<T, P1, R>
/** An extension function with introspection capabilities that takes 2 arguments. */
public interface KExtensionFunction2<in T, in P1, in P2, out R> : ExtensionFunction2<T, P1, P2, R>
/** An extension function with introspection capabilities that takes 3 arguments. */
public interface KExtensionFunction3<in T, in P1, in P2, in P3, out R> : ExtensionFunction3<T, P1, P2, P3, R>
/** An extension function with introspection capabilities that takes 4 arguments. */
public interface KExtensionFunction4<in T, in P1, in P2, in P3, in P4, out R> : ExtensionFunction4<T, P1, P2, P3, P4, R>
/** An extension function with introspection capabilities that takes 5 arguments. */
public interface KExtensionFunction5<in T, in P1, in P2, in P3, in P4, in P5, out R> : ExtensionFunction5<T, P1, P2, P3, P4, P5, R>
/** An extension function with introspection capabilities that takes 6 arguments. */
public interface KExtensionFunction6<in T, in P1, in P2, in P3, in P4, in P5, in P6, out R> : ExtensionFunction6<T, P1, P2, P3, P4, P5, P6, R>
/** An extension function with introspection capabilities that takes 7 arguments. */
public interface KExtensionFunction7<in T, in P1, in P2, in P3, in P4, in P5, in P6, in P7, out R> : ExtensionFunction7<T, P1, P2, P3, P4, P5, P6, P7, R>
/** An extension function with introspection capabilities that takes 8 arguments. */
public interface KExtensionFunction8<in T, in P1, in P2, in P3, in P4, in P5, in P6, in P7, in P8, out R> : ExtensionFunction8<T, P1, P2, P3, P4, P5, P6, P7, P8, R>
/** An extension function with introspection capabilities that takes 9 arguments. */
public interface KExtensionFunction9<in T, in P1, in P2, in P3, in P4, in P5, in P6, in P7, in P8, in P9, out R> : ExtensionFunction9<T, P1, P2, P3, P4, P5, P6, P7, P8, P9, R>
/** An extension function with introspection capabilities that takes 10 arguments. */
public interface KExtensionFunction10<in T, in P1, in P2, in P3, in P4, in P5, in P6, in P7, in P8, in P9, in P10, out R> : ExtensionFunction10<T, P1, P2, P3, P4, P5, P6, P7, P8, P9, P10, R>
/** An extension function with introspection capabilities that takes 11 arguments. */
public interface KExtensionFunction11<in T, in P1, in P2, in P3, in P4, in P5, in P6, in P7, in P8, in P9, in P10, in P11, out R> : ExtensionFunction11<T, P1, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, R>
/** An extension function with introspection capabilities that takes 12 arguments. */
public interface KExtensionFunction12<in T, 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> : ExtensionFunction12<T, P1, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, R>
/** An extension function with introspection capabilities that takes 13 arguments. */
public interface KExtensionFunction13<in T, 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> : ExtensionFunction13<T, P1, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, R>
/** An extension function with introspection capabilities that takes 14 arguments. */
public interface KExtensionFunction14<in T, 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> : ExtensionFunction14<T, P1, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, R>
/** An extension function with introspection capabilities that takes 15 arguments. */
public interface KExtensionFunction15<in T, 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> : ExtensionFunction15<T, P1, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, R>
/** An extension function with introspection capabilities that takes 16 arguments. */
public interface KExtensionFunction16<in T, 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> : ExtensionFunction16<T, P1, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, R>
/** An extension function with introspection capabilities that takes 17 arguments. */
public interface KExtensionFunction17<in T, 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> : ExtensionFunction17<T, P1, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, R>
/** An extension function with introspection capabilities that takes 18 arguments. */
public interface KExtensionFunction18<in T, 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> : ExtensionFunction18<T, P1, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, P18, R>
/** An extension function with introspection capabilities that takes 19 arguments. */
public interface KExtensionFunction19<in T, 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> : ExtensionFunction19<T, P1, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, P18, P19, R>
/** An extension function with introspection capabilities that takes 20 arguments. */
public interface KExtensionFunction20<in T, 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> : ExtensionFunction20<T, P1, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, P18, P19, P20, R>
/** An extension function with introspection capabilities that takes 21 arguments. */
public interface KExtensionFunction21<in T, 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> : ExtensionFunction21<T, P1, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, P18, P19, P20, P21, R>
/** An extension function with introspection capabilities that takes 22 arguments. */
public interface KExtensionFunction22<in T, 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> : ExtensionFunction22<T, P1, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, P18, P19, P20, P21, P22, R>
@@ -1,66 +0,0 @@
/*
* Copyright 2010-2015 JetBrains s.r.o.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
// Auto-generated file. DO NOT EDIT!
package kotlin.reflect
/** A function with introspection capabilities that takes 0 arguments. */
public interface KFunction0<out R> : Function0<R>
/** A function with introspection capabilities that takes 1 argument. */
public interface KFunction1<in P1, out R> : Function1<P1, R>
/** A function with introspection capabilities that takes 2 arguments. */
public interface KFunction2<in P1, in P2, out R> : Function2<P1, P2, R>
/** A function with introspection capabilities that takes 3 arguments. */
public interface KFunction3<in P1, in P2, in P3, out R> : Function3<P1, P2, P3, R>
/** A function with introspection capabilities that takes 4 arguments. */
public interface KFunction4<in P1, in P2, in P3, in P4, out R> : Function4<P1, P2, P3, P4, R>
/** A function with introspection capabilities that takes 5 arguments. */
public interface KFunction5<in P1, in P2, in P3, in P4, in P5, out R> : Function5<P1, P2, P3, P4, P5, R>
/** A function with introspection capabilities that takes 6 arguments. */
public interface KFunction6<in P1, in P2, in P3, in P4, in P5, in P6, out R> : Function6<P1, P2, P3, P4, P5, P6, R>
/** A function with introspection capabilities that takes 7 arguments. */
public interface KFunction7<in P1, in P2, in P3, in P4, in P5, in P6, in P7, out R> : Function7<P1, P2, P3, P4, P5, P6, P7, R>
/** A function with introspection capabilities that takes 8 arguments. */
public interface KFunction8<in P1, in P2, in P3, in P4, in P5, in P6, in P7, in P8, out R> : Function8<P1, P2, P3, P4, P5, P6, P7, P8, R>
/** A function with introspection capabilities that takes 9 arguments. */
public interface KFunction9<in P1, in P2, in P3, in P4, in P5, in P6, in P7, in P8, in P9, out R> : Function9<P1, P2, P3, P4, P5, P6, P7, P8, P9, R>
/** A function with introspection capabilities that takes 10 arguments. */
public interface KFunction10<in P1, in P2, in P3, in P4, in P5, in P6, in P7, in P8, in P9, in P10, out R> : Function10<P1, P2, P3, P4, P5, P6, P7, P8, P9, P10, R>
/** A function with introspection capabilities that takes 11 arguments. */
public interface KFunction11<in P1, in P2, in P3, in P4, in P5, in P6, in P7, in P8, in P9, in P10, in P11, out R> : Function11<P1, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, R>
/** A function with introspection capabilities that takes 12 arguments. */
public interface KFunction12<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> : Function12<P1, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, R>
/** A function with introspection capabilities that takes 13 arguments. */
public interface KFunction13<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> : Function13<P1, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, R>
/** A function with introspection capabilities that takes 14 arguments. */
public interface KFunction14<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> : Function14<P1, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, R>
/** A function with introspection capabilities that takes 15 arguments. */
public interface KFunction15<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> : Function15<P1, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, R>
/** A function with introspection capabilities that takes 16 arguments. */
public interface KFunction16<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> : Function16<P1, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, R>
/** A function with introspection capabilities that takes 17 arguments. */
public interface KFunction17<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> : Function17<P1, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, R>
/** A function with introspection capabilities that takes 18 arguments. */
public interface KFunction18<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> : Function18<P1, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, P18, R>
/** A function with introspection capabilities that takes 19 arguments. */
public interface KFunction19<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> : Function19<P1, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, P18, P19, R>
/** A function with introspection capabilities that takes 20 arguments. */
public interface KFunction20<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> : Function20<P1, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, P18, P19, P20, R>
/** A function with introspection capabilities that takes 21 arguments. */
public interface KFunction21<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> : Function21<P1, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, P18, P19, P20, P21, R>
/** A function with introspection capabilities that takes 22 arguments. */
public interface KFunction22<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> : Function22<P1, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, P18, P19, P20, P21, P22, R>
@@ -1,66 +0,0 @@
/*
* Copyright 2010-2015 JetBrains s.r.o.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
// Auto-generated file. DO NOT EDIT!
package kotlin.reflect
/** A member function with introspection capabilities that takes 0 arguments. */
public interface KMemberFunction0<in T, out R> : ExtensionFunction0<T, R>
/** A member function with introspection capabilities that takes 1 argument. */
public interface KMemberFunction1<in T, in P1, out R> : ExtensionFunction1<T, P1, R>
/** A member function with introspection capabilities that takes 2 arguments. */
public interface KMemberFunction2<in T, in P1, in P2, out R> : ExtensionFunction2<T, P1, P2, R>
/** A member function with introspection capabilities that takes 3 arguments. */
public interface KMemberFunction3<in T, in P1, in P2, in P3, out R> : ExtensionFunction3<T, P1, P2, P3, R>
/** A member function with introspection capabilities that takes 4 arguments. */
public interface KMemberFunction4<in T, in P1, in P2, in P3, in P4, out R> : ExtensionFunction4<T, P1, P2, P3, P4, R>
/** A member function with introspection capabilities that takes 5 arguments. */
public interface KMemberFunction5<in T, in P1, in P2, in P3, in P4, in P5, out R> : ExtensionFunction5<T, P1, P2, P3, P4, P5, R>
/** A member function with introspection capabilities that takes 6 arguments. */
public interface KMemberFunction6<in T, in P1, in P2, in P3, in P4, in P5, in P6, out R> : ExtensionFunction6<T, P1, P2, P3, P4, P5, P6, R>
/** A member function with introspection capabilities that takes 7 arguments. */
public interface KMemberFunction7<in T, in P1, in P2, in P3, in P4, in P5, in P6, in P7, out R> : ExtensionFunction7<T, P1, P2, P3, P4, P5, P6, P7, R>
/** A member function with introspection capabilities that takes 8 arguments. */
public interface KMemberFunction8<in T, in P1, in P2, in P3, in P4, in P5, in P6, in P7, in P8, out R> : ExtensionFunction8<T, P1, P2, P3, P4, P5, P6, P7, P8, R>
/** A member function with introspection capabilities that takes 9 arguments. */
public interface KMemberFunction9<in T, in P1, in P2, in P3, in P4, in P5, in P6, in P7, in P8, in P9, out R> : ExtensionFunction9<T, P1, P2, P3, P4, P5, P6, P7, P8, P9, R>
/** A member function with introspection capabilities that takes 10 arguments. */
public interface KMemberFunction10<in T, in P1, in P2, in P3, in P4, in P5, in P6, in P7, in P8, in P9, in P10, out R> : ExtensionFunction10<T, P1, P2, P3, P4, P5, P6, P7, P8, P9, P10, R>
/** A member function with introspection capabilities that takes 11 arguments. */
public interface KMemberFunction11<in T, in P1, in P2, in P3, in P4, in P5, in P6, in P7, in P8, in P9, in P10, in P11, out R> : ExtensionFunction11<T, P1, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, R>
/** A member function with introspection capabilities that takes 12 arguments. */
public interface KMemberFunction12<in T, 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> : ExtensionFunction12<T, P1, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, R>
/** A member function with introspection capabilities that takes 13 arguments. */
public interface KMemberFunction13<in T, 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> : ExtensionFunction13<T, P1, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, R>
/** A member function with introspection capabilities that takes 14 arguments. */
public interface KMemberFunction14<in T, 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> : ExtensionFunction14<T, P1, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, R>
/** A member function with introspection capabilities that takes 15 arguments. */
public interface KMemberFunction15<in T, 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> : ExtensionFunction15<T, P1, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, R>
/** A member function with introspection capabilities that takes 16 arguments. */
public interface KMemberFunction16<in T, 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> : ExtensionFunction16<T, P1, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, R>
/** A member function with introspection capabilities that takes 17 arguments. */
public interface KMemberFunction17<in T, 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> : ExtensionFunction17<T, P1, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, R>
/** A member function with introspection capabilities that takes 18 arguments. */
public interface KMemberFunction18<in T, 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> : ExtensionFunction18<T, P1, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, P18, R>
/** A member function with introspection capabilities that takes 19 arguments. */
public interface KMemberFunction19<in T, 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> : ExtensionFunction19<T, P1, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, P18, P19, R>
/** A member function with introspection capabilities that takes 20 arguments. */
public interface KMemberFunction20<in T, 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> : ExtensionFunction20<T, P1, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, P18, P19, P20, R>
/** A member function with introspection capabilities that takes 21 arguments. */
public interface KMemberFunction21<in T, 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> : ExtensionFunction21<T, P1, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, P18, P19, P20, P21, R>
/** A member function with introspection capabilities that takes 22 arguments. */
public interface KMemberFunction22<in T, 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> : ExtensionFunction22<T, P1, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, P18, P19, P20, P21, P22, R>
@@ -16,7 +16,7 @@
// Auto-generated file. DO NOT EDIT!
package kotlin
package kotlin.jvm.functions
/** A function that takes 0 arguments. */
public interface Function0<out R> : Function<R> {
@@ -16,35 +16,28 @@
package org.jetbrains.kotlin.generators.builtins.functions
import org.jetbrains.kotlin.generators.builtins.functions.FunctionKind.*
import org.jetbrains.kotlin.generators.builtins.generateBuiltIns.BuiltInsSourceGenerator
import java.io.PrintWriter
val MAX_PARAM_COUNT = 22
enum class FunctionKind(
private val classNamePrefix: String,
val classFqNamePrefix: String,
val docPrefix: String,
val hasReceiverParameter: Boolean,
private val superClassNamePrefix: String?
val hasReceiverParameter: Boolean
) {
FUNCTION("Function", "A function", false, null),
EXTENSION_FUNCTION("ExtensionFunction", "An extension function", true, null),
FUNCTION : FunctionKind("kotlin.jvm.functions.Function", "A function", false)
EXTENSION_FUNCTION : FunctionKind("kotlin.ExtensionFunction", "An extension function", true)
K_FUNCTION("KFunction", "A function with introspection capabilities", false, "Function"),
K_MEMBER_FUNCTION("KMemberFunction", "A member function with introspection capabilities", true, "ExtensionFunction"),
K_EXTENSION_FUNCTION("KExtensionFunction", "An extension function with introspection capabilities", true, "ExtensionFunction");
val classNamePrefix: String get() = classFqNamePrefix.substringAfterLast('.')
val packageFqName: String get() = classFqNamePrefix.substringBeforeLast('.')
val fileName: String get() = classFqNamePrefix.replace('.', '/') + "s.kt"
fun getFileName() = (if (isReflection()) "reflect/" else "") + classNamePrefix + "s.kt"
fun getClassName(i: Int) = classNamePrefix + i
fun getSuperClassName(i: Int) = superClassNamePrefix?.plus(i)
fun getPackage() = if (isReflection()) "kotlin.reflect" else "kotlin"
fun isReflection() = name() startsWith "K"
}
class GenerateFunctions(out: PrintWriter, val kind: FunctionKind) : BuiltInsSourceGenerator(out) {
override fun getPackage() = kind.getPackage()
override fun getPackage() = kind.packageFqName
fun generateTypeParameters(i: Int, variance: Boolean) {
out.print("<")
@@ -73,7 +66,7 @@ class GenerateFunctions(out: PrintWriter, val kind: FunctionKind) : BuiltInsSour
generateDocumentation(i)
out.print("public interface " + kind.getClassName(i))
generateTypeParameters(i, variance = true)
generateSuperClass(i)
generateSuperClass()
generateFunctionClassBody(i)
}
}
@@ -83,28 +76,16 @@ class GenerateFunctions(out: PrintWriter, val kind: FunctionKind) : BuiltInsSour
out.println("/** ${kind.docPrefix} that takes $i argument${suffix}. */")
}
fun generateSuperClass(i: Int) {
val superClass = kind.getSuperClassName(i)
if (superClass != null) {
out.print(" : $superClass")
generateTypeParameters(i, variance = false)
}
else {
out.print(" : Function<")
generateReturnTypeParameter(variance = false)
out.print(">")
}
fun generateSuperClass() {
out.print(" : Function<")
generateReturnTypeParameter(variance = false)
out.print(">")
}
fun generateFunctionClassBody(i: Int): Unit = when (kind) {
FUNCTION, EXTENSION_FUNCTION -> {
out.println(" {")
generateInvokeSignature(i)
out.println("}")
}
K_FUNCTION, K_MEMBER_FUNCTION, K_EXTENSION_FUNCTION -> {
out.println()
}
fun generateFunctionClassBody(i: Int) {
out.println(" {")
generateInvokeSignature(i)
out.println("}")
}
fun generateInvokeSignature(i: Int) {
@@ -31,9 +31,9 @@ import java.io.PrintWriter
fun assertExists(file: File): Unit =
if (!file.exists()) error("Output dir does not exist: ${file.getAbsolutePath()}")
val BUILT_INS_NATIVE_DIR = File("core/builtins/native/kotlin/")
val BUILT_INS_SRC_DIR = File("core/builtins/src/kotlin/")
val RUNTIME_JVM_DIR = File("core/runtime.jvm/src/kotlin/")
val BUILT_INS_NATIVE_DIR = File("core/builtins/native/")
val BUILT_INS_SRC_DIR = File("core/builtins/src/")
val RUNTIME_JVM_DIR = File("core/runtime.jvm/src/")
abstract class BuiltInsSourceGenerator(val out: PrintWriter) {
protected abstract fun generateBody(): Unit
@@ -59,16 +59,17 @@ fun generateBuiltIns(generate: (File, (PrintWriter) -> BuiltInsSourceGenerator)
assertExists(RUNTIME_JVM_DIR)
for (kind in FunctionKind.values()) {
generate(File(BUILT_INS_SRC_DIR, kind.getFileName())) { GenerateFunctions(it, kind) }
val dir = if (kind == FunctionKind.FUNCTION) RUNTIME_JVM_DIR else BUILT_INS_SRC_DIR
generate(File(dir, kind.fileName)) { GenerateFunctions(it, kind) }
}
generate(File(BUILT_INS_NATIVE_DIR, "Arrays.kt")) { GenerateArrays(it) }
generate(File(BUILT_INS_NATIVE_DIR, "Primitives.kt")) { GeneratePrimitives(it) }
generate(File(BUILT_INS_SRC_DIR, "Iterators.kt")) { GenerateIterators(it) }
generate(File(RUNTIME_JVM_DIR, "jvm/internal/ArrayIterators.kt")) { GenerateArrayIterators(it) }
generate(File(BUILT_INS_SRC_DIR, "ProgressionIterators.kt")) { GenerateProgressionIterators(it) }
generate(File(BUILT_INS_SRC_DIR, "Progressions.kt")) { GenerateProgressions(it) }
generate(File(BUILT_INS_SRC_DIR, "Ranges.kt")) { GenerateRanges(it) }
generate(File(BUILT_INS_NATIVE_DIR, "kotlin/Arrays.kt")) { GenerateArrays(it) }
generate(File(BUILT_INS_NATIVE_DIR, "kotlin/Primitives.kt")) { GeneratePrimitives(it) }
generate(File(BUILT_INS_SRC_DIR, "kotlin/Iterators.kt")) { GenerateIterators(it) }
generate(File(RUNTIME_JVM_DIR, "kotlin/jvm/internal/ArrayIterators.kt")) { GenerateArrayIterators(it) }
generate(File(BUILT_INS_SRC_DIR, "kotlin/ProgressionIterators.kt")) { GenerateProgressionIterators(it) }
generate(File(BUILT_INS_SRC_DIR, "kotlin/Progressions.kt")) { GenerateProgressions(it) }
generate(File(BUILT_INS_SRC_DIR, "kotlin/Ranges.kt")) { GenerateRanges(it) }
}
fun main(args: Array<String>) {
-1
View File
@@ -4,7 +4,6 @@
<include name="native/kotlin/Collections.kt"/>
<include name="src/kotlin/ExtensionFunctions.kt"/>
<include name="src/kotlin/Function.kt"/>
<include name="src/kotlin/Functions.kt"/>
<include name="src/kotlin/Iterators.kt"/>
<include name="src/kotlin/Range.kt"/>
<include name="src/kotlin/FloatingPointConstants.kt"/>