Create module 'builtins', move 'runtime' -> 'runtime.jvm'
'builtins' will be used for platform-independent core built-in definitions, 'runtime.jvm' for things that should be present at runtime in order for Kotlin code to execute correctly on JVM ProgressionUtil goes to 'builtins' right now because progression iterators depend on it, but should be rewritten to Kotlin later
This commit is contained in:
@@ -0,0 +1,12 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<module type="JAVA_MODULE" version="4">
|
||||
<component name="NewModuleRootManager" inherit-compiler-output="true">
|
||||
<exclude-output />
|
||||
<content url="file://$MODULE_DIR$">
|
||||
<sourceFolder url="file://$MODULE_DIR$/src" isTestSource="false" />
|
||||
</content>
|
||||
<orderEntry type="inheritedJdk" />
|
||||
<orderEntry type="sourceFolder" forTests="false" />
|
||||
</component>
|
||||
</module>
|
||||
|
||||
@@ -0,0 +1,7 @@
|
||||
package jet
|
||||
|
||||
public annotation class atomic
|
||||
public annotation class data
|
||||
public annotation class deprecated(val value: String)
|
||||
public annotation class suppress(vararg val names: String)
|
||||
public annotation class tailRecursive
|
||||
@@ -0,0 +1,73 @@
|
||||
// Generated by org.jetbrains.jet.generators.runtime.functions.GenerateFunctions
|
||||
|
||||
package jet
|
||||
|
||||
public trait ExtensionFunction0<in T, out R> {
|
||||
public fun T.invoke(): R
|
||||
}
|
||||
public trait ExtensionFunction1<in T, in P1, out R> {
|
||||
public fun T.invoke(p1: P1): R
|
||||
}
|
||||
public trait ExtensionFunction2<in T, in P1, in P2, out R> {
|
||||
public fun T.invoke(p1: P1, p2: P2): R
|
||||
}
|
||||
public trait ExtensionFunction3<in T, in P1, in P2, in P3, out R> {
|
||||
public fun T.invoke(p1: P1, p2: P2, p3: P3): R
|
||||
}
|
||||
public trait ExtensionFunction4<in T, in P1, in P2, in P3, in P4, out R> {
|
||||
public fun T.invoke(p1: P1, p2: P2, p3: P3, p4: P4): R
|
||||
}
|
||||
public trait ExtensionFunction5<in T, in P1, in P2, in P3, in P4, in P5, out R> {
|
||||
public fun T.invoke(p1: P1, p2: P2, p3: P3, p4: P4, p5: P5): R
|
||||
}
|
||||
public trait ExtensionFunction6<in T, in P1, in P2, in P3, in P4, in P5, in P6, out R> {
|
||||
public fun T.invoke(p1: P1, p2: P2, p3: P3, p4: P4, p5: P5, p6: P6): R
|
||||
}
|
||||
public trait ExtensionFunction7<in T, in P1, in P2, in P3, in P4, in P5, in P6, in P7, out R> {
|
||||
public fun T.invoke(p1: P1, p2: P2, p3: P3, p4: P4, p5: P5, p6: P6, p7: P7): R
|
||||
}
|
||||
public trait ExtensionFunction8<in T, in P1, in P2, in P3, in P4, in P5, in P6, in P7, in P8, out R> {
|
||||
public fun T.invoke(p1: P1, p2: P2, p3: P3, p4: P4, p5: P5, p6: P6, p7: P7, p8: P8): R
|
||||
}
|
||||
public trait ExtensionFunction9<in T, in P1, in P2, in P3, in P4, in P5, in P6, in P7, in P8, in P9, out R> {
|
||||
public fun T.invoke(p1: P1, p2: P2, p3: P3, p4: P4, p5: P5, p6: P6, p7: P7, p8: P8, p9: P9): R
|
||||
}
|
||||
public trait ExtensionFunction10<in T, in P1, in P2, in P3, in P4, in P5, in P6, in P7, in P8, in P9, in P10, out R> {
|
||||
public fun T.invoke(p1: P1, p2: P2, p3: P3, p4: P4, p5: P5, p6: P6, p7: P7, p8: P8, p9: P9, p10: P10): R
|
||||
}
|
||||
public trait ExtensionFunction11<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> {
|
||||
public fun T.invoke(p1: P1, p2: P2, p3: P3, p4: P4, p5: P5, p6: P6, p7: P7, p8: P8, p9: P9, p10: P10, p11: P11): R
|
||||
}
|
||||
public trait ExtensionFunction12<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> {
|
||||
public fun T.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
|
||||
}
|
||||
public trait ExtensionFunction13<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> {
|
||||
public fun T.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
|
||||
}
|
||||
public trait ExtensionFunction14<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> {
|
||||
public fun T.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
|
||||
}
|
||||
public trait ExtensionFunction15<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> {
|
||||
public fun T.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
|
||||
}
|
||||
public trait ExtensionFunction16<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> {
|
||||
public fun T.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
|
||||
}
|
||||
public trait ExtensionFunction17<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> {
|
||||
public fun T.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
|
||||
}
|
||||
public trait ExtensionFunction18<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> {
|
||||
public fun T.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
|
||||
}
|
||||
public trait ExtensionFunction19<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> {
|
||||
public fun T.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
|
||||
}
|
||||
public trait ExtensionFunction20<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> {
|
||||
public fun T.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
|
||||
}
|
||||
public trait ExtensionFunction21<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> {
|
||||
public fun T.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
|
||||
}
|
||||
public trait ExtensionFunction22<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> {
|
||||
public fun T.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
|
||||
}
|
||||
@@ -0,0 +1,73 @@
|
||||
// Generated by org.jetbrains.jet.generators.runtime.functions.GenerateFunctions
|
||||
|
||||
package jet
|
||||
|
||||
public trait Function0<out R> {
|
||||
public fun invoke(): R
|
||||
}
|
||||
public trait Function1<in P1, out R> {
|
||||
public fun invoke(p1: P1): R
|
||||
}
|
||||
public trait Function2<in P1, in P2, out R> {
|
||||
public fun invoke(p1: P1, p2: P2): R
|
||||
}
|
||||
public trait Function3<in P1, in P2, in P3, out R> {
|
||||
public fun invoke(p1: P1, p2: P2, p3: P3): R
|
||||
}
|
||||
public trait Function4<in P1, in P2, in P3, in P4, out R> {
|
||||
public fun invoke(p1: P1, p2: P2, p3: P3, p4: P4): R
|
||||
}
|
||||
public trait Function5<in P1, in P2, in P3, in P4, in P5, out R> {
|
||||
public fun invoke(p1: P1, p2: P2, p3: P3, p4: P4, p5: P5): R
|
||||
}
|
||||
public trait Function6<in P1, in P2, in P3, in P4, in P5, in P6, out R> {
|
||||
public fun invoke(p1: P1, p2: P2, p3: P3, p4: P4, p5: P5, p6: P6): R
|
||||
}
|
||||
public trait Function7<in P1, in P2, in P3, in P4, in P5, in P6, in P7, out R> {
|
||||
public fun invoke(p1: P1, p2: P2, p3: P3, p4: P4, p5: P5, p6: P6, p7: P7): R
|
||||
}
|
||||
public trait Function8<in P1, in P2, in P3, in P4, in P5, in P6, in P7, in P8, out R> {
|
||||
public fun invoke(p1: P1, p2: P2, p3: P3, p4: P4, p5: P5, p6: P6, p7: P7, p8: P8): R
|
||||
}
|
||||
public trait Function9<in P1, in P2, in P3, in P4, in P5, in P6, in P7, in P8, in P9, out R> {
|
||||
public fun invoke(p1: P1, p2: P2, p3: P3, p4: P4, p5: P5, p6: P6, p7: P7, p8: P8, p9: P9): R
|
||||
}
|
||||
public trait Function10<in P1, in P2, in P3, in P4, in P5, in P6, in P7, in P8, in P9, in P10, out R> {
|
||||
public fun invoke(p1: P1, p2: P2, p3: P3, p4: P4, p5: P5, p6: P6, p7: P7, p8: P8, p9: P9, p10: P10): R
|
||||
}
|
||||
public trait 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> {
|
||||
public 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
|
||||
}
|
||||
public trait 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> {
|
||||
public 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
|
||||
}
|
||||
public trait 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> {
|
||||
public 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
|
||||
}
|
||||
public trait 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> {
|
||||
public 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
|
||||
}
|
||||
public trait 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> {
|
||||
public 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
|
||||
}
|
||||
public trait 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> {
|
||||
public 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
|
||||
}
|
||||
public trait 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> {
|
||||
public 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
|
||||
}
|
||||
public trait 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> {
|
||||
public 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
|
||||
}
|
||||
public trait 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> {
|
||||
public 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
|
||||
}
|
||||
public trait 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> {
|
||||
public 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
|
||||
}
|
||||
public trait 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> {
|
||||
public 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
|
||||
}
|
||||
public trait 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> {
|
||||
public 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
|
||||
}
|
||||
@@ -0,0 +1,8 @@
|
||||
package jet
|
||||
|
||||
public annotation class noinline
|
||||
public annotation class inline(public val strategy: InlineStrategy = InlineStrategy.AS_FUNCTION)
|
||||
public enum class InlineStrategy {
|
||||
AS_FUNCTION
|
||||
IN_PLACE
|
||||
}
|
||||
@@ -0,0 +1,52 @@
|
||||
// Generated by org.jetbrains.jet.generators.runtime.iterators.GenerateIterators
|
||||
|
||||
package jet
|
||||
|
||||
public abstract class ByteIterator : Iterator<Byte> {
|
||||
override final fun next() = nextByte()
|
||||
|
||||
public abstract fun nextByte(): Byte
|
||||
}
|
||||
|
||||
public abstract class CharIterator : Iterator<Char> {
|
||||
override final fun next() = nextChar()
|
||||
|
||||
public abstract fun nextChar(): Char
|
||||
}
|
||||
|
||||
public abstract class ShortIterator : Iterator<Short> {
|
||||
override final fun next() = nextShort()
|
||||
|
||||
public abstract fun nextShort(): Short
|
||||
}
|
||||
|
||||
public abstract class IntIterator : Iterator<Int> {
|
||||
override final fun next() = nextInt()
|
||||
|
||||
public abstract fun nextInt(): Int
|
||||
}
|
||||
|
||||
public abstract class LongIterator : Iterator<Long> {
|
||||
override final fun next() = nextLong()
|
||||
|
||||
public abstract fun nextLong(): Long
|
||||
}
|
||||
|
||||
public abstract class FloatIterator : Iterator<Float> {
|
||||
override final fun next() = nextFloat()
|
||||
|
||||
public abstract fun nextFloat(): Float
|
||||
}
|
||||
|
||||
public abstract class DoubleIterator : Iterator<Double> {
|
||||
override final fun next() = nextDouble()
|
||||
|
||||
public abstract fun nextDouble(): Double
|
||||
}
|
||||
|
||||
public abstract class BooleanIterator : Iterator<Boolean> {
|
||||
override final fun next() = nextBoolean()
|
||||
|
||||
public abstract fun nextBoolean(): Boolean
|
||||
}
|
||||
|
||||
@@ -0,0 +1,27 @@
|
||||
// Generated by org.jetbrains.jet.generators.runtime.functions.GenerateFunctions
|
||||
|
||||
package jet
|
||||
|
||||
public trait KExtensionFunction0<in T, out R> : ExtensionFunction0<T, R>
|
||||
public trait KExtensionFunction1<in T, in P1, out R> : ExtensionFunction1<T, P1, R>
|
||||
public trait KExtensionFunction2<in T, in P1, in P2, out R> : ExtensionFunction2<T, P1, P2, R>
|
||||
public trait KExtensionFunction3<in T, in P1, in P2, in P3, out R> : ExtensionFunction3<T, P1, P2, P3, R>
|
||||
public trait KExtensionFunction4<in T, in P1, in P2, in P3, in P4, out R> : ExtensionFunction4<T, P1, P2, P3, P4, R>
|
||||
public trait KExtensionFunction5<in T, in P1, in P2, in P3, in P4, in P5, out R> : ExtensionFunction5<T, P1, P2, P3, P4, P5, R>
|
||||
public trait 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>
|
||||
public trait 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>
|
||||
public trait 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>
|
||||
public trait 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>
|
||||
public trait 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>
|
||||
public trait 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>
|
||||
public trait 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>
|
||||
public trait 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>
|
||||
public trait 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>
|
||||
public trait 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>
|
||||
public trait 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>
|
||||
public trait 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>
|
||||
public trait 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>
|
||||
public trait 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>
|
||||
public trait 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>
|
||||
public trait 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>
|
||||
public trait 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>
|
||||
@@ -0,0 +1,27 @@
|
||||
// Generated by org.jetbrains.jet.generators.runtime.functions.GenerateFunctions
|
||||
|
||||
package jet
|
||||
|
||||
public trait KFunction0<out R> : Function0<R>
|
||||
public trait KFunction1<in P1, out R> : Function1<P1, R>
|
||||
public trait KFunction2<in P1, in P2, out R> : Function2<P1, P2, R>
|
||||
public trait KFunction3<in P1, in P2, in P3, out R> : Function3<P1, P2, P3, R>
|
||||
public trait KFunction4<in P1, in P2, in P3, in P4, out R> : Function4<P1, P2, P3, P4, R>
|
||||
public trait KFunction5<in P1, in P2, in P3, in P4, in P5, out R> : Function5<P1, P2, P3, P4, P5, R>
|
||||
public trait KFunction6<in P1, in P2, in P3, in P4, in P5, in P6, out R> : Function6<P1, P2, P3, P4, P5, P6, R>
|
||||
public trait 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>
|
||||
public trait 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>
|
||||
public trait 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>
|
||||
public trait 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>
|
||||
public trait 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>
|
||||
public trait 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>
|
||||
public trait 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>
|
||||
public trait 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>
|
||||
public trait 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>
|
||||
public trait 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>
|
||||
public trait 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>
|
||||
public trait 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>
|
||||
public trait 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>
|
||||
public trait 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>
|
||||
public trait 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>
|
||||
public trait 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>
|
||||
@@ -0,0 +1,27 @@
|
||||
// Generated by org.jetbrains.jet.generators.runtime.functions.GenerateFunctions
|
||||
|
||||
package jet
|
||||
|
||||
public trait KMemberFunction0<in T, out R> : ExtensionFunction0<T, R>
|
||||
public trait KMemberFunction1<in T, in P1, out R> : ExtensionFunction1<T, P1, R>
|
||||
public trait KMemberFunction2<in T, in P1, in P2, out R> : ExtensionFunction2<T, P1, P2, R>
|
||||
public trait KMemberFunction3<in T, in P1, in P2, in P3, out R> : ExtensionFunction3<T, P1, P2, P3, R>
|
||||
public trait KMemberFunction4<in T, in P1, in P2, in P3, in P4, out R> : ExtensionFunction4<T, P1, P2, P3, P4, R>
|
||||
public trait KMemberFunction5<in T, in P1, in P2, in P3, in P4, in P5, out R> : ExtensionFunction5<T, P1, P2, P3, P4, P5, R>
|
||||
public trait 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>
|
||||
public trait 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>
|
||||
public trait 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>
|
||||
public trait 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>
|
||||
public trait 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>
|
||||
public trait 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>
|
||||
public trait 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>
|
||||
public trait 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>
|
||||
public trait 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>
|
||||
public trait 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>
|
||||
public trait 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>
|
||||
public trait 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>
|
||||
public trait 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>
|
||||
public trait 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>
|
||||
public trait 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>
|
||||
public trait 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>
|
||||
public trait 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>
|
||||
@@ -0,0 +1,25 @@
|
||||
/*
|
||||
* Copyright 2010-2014 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.
|
||||
*/
|
||||
|
||||
package jet
|
||||
|
||||
public trait Progression<N : Any> : Iterable<N> {
|
||||
public val start: N
|
||||
|
||||
public val end: N
|
||||
|
||||
public val increment: Number
|
||||
}
|
||||
@@ -0,0 +1,122 @@
|
||||
package jet
|
||||
|
||||
import jet.runtime.ProgressionUtil
|
||||
|
||||
class ByteProgressionIterator(start: Byte, end: Byte, val increment: Int) : ByteIterator() {
|
||||
private var next = start.toInt()
|
||||
private val finalElement = ProgressionUtil.getProgressionFinalElement(start.toInt(), end.toInt(), increment).toByte()
|
||||
private var hasNext = if (increment > 0) start <= end else start >= end
|
||||
|
||||
override fun hasNext() = hasNext
|
||||
|
||||
override fun nextByte(): Byte {
|
||||
val value = next
|
||||
if (value == finalElement.toInt()) {
|
||||
hasNext = false
|
||||
}
|
||||
else {
|
||||
next += increment
|
||||
}
|
||||
return value.toByte()
|
||||
}
|
||||
}
|
||||
|
||||
class CharProgressionIterator(start: Char, end: Char, val increment: Int) : CharIterator() {
|
||||
private var next = start.toInt()
|
||||
private val finalElement = ProgressionUtil.getProgressionFinalElement(start.toInt(), end.toInt(), increment).toChar()
|
||||
private var hasNext = if (increment > 0) start <= end else start >= end
|
||||
|
||||
override fun hasNext() = hasNext
|
||||
|
||||
override fun nextChar(): Char {
|
||||
val value = next
|
||||
if (value == finalElement.toInt()) {
|
||||
hasNext = false
|
||||
}
|
||||
else {
|
||||
next += increment
|
||||
}
|
||||
return value.toChar()
|
||||
}
|
||||
}
|
||||
|
||||
class ShortProgressionIterator(start: Short, end: Short, val increment: Int) : ShortIterator() {
|
||||
private var next = start.toInt()
|
||||
private val finalElement = ProgressionUtil.getProgressionFinalElement(start.toInt(), end.toInt(), increment).toShort()
|
||||
private var hasNext = if (increment > 0) start <= end else start >= end
|
||||
|
||||
override fun hasNext() = hasNext
|
||||
|
||||
override fun nextShort(): Short {
|
||||
val value = next
|
||||
if (value == finalElement.toInt()) {
|
||||
hasNext = false
|
||||
}
|
||||
else {
|
||||
next += increment
|
||||
}
|
||||
return value.toShort()
|
||||
}
|
||||
}
|
||||
|
||||
class IntProgressionIterator(start: Int, end: Int, val increment: Int) : IntIterator() {
|
||||
private var next = start
|
||||
private val finalElement = ProgressionUtil.getProgressionFinalElement(start, end, increment)
|
||||
private var hasNext = if (increment > 0) start <= end else start >= end
|
||||
|
||||
override fun hasNext() = hasNext
|
||||
|
||||
override fun nextInt(): Int {
|
||||
val value = next
|
||||
if (value == finalElement) {
|
||||
hasNext = false
|
||||
}
|
||||
else {
|
||||
next += increment
|
||||
}
|
||||
return value
|
||||
}
|
||||
}
|
||||
|
||||
class LongProgressionIterator(start: Long, end: Long, val increment: Long) : LongIterator() {
|
||||
private var next = start
|
||||
private val finalElement = ProgressionUtil.getProgressionFinalElement(start, end, increment)
|
||||
private var hasNext = if (increment > 0) start <= end else start >= end
|
||||
|
||||
override fun hasNext() = hasNext
|
||||
|
||||
override fun nextLong(): Long {
|
||||
val value = next
|
||||
if (value == finalElement) {
|
||||
hasNext = false
|
||||
}
|
||||
else {
|
||||
next += increment
|
||||
}
|
||||
return value
|
||||
}
|
||||
}
|
||||
|
||||
class FloatProgressionIterator(start: Float, val end: Float, val increment: Float) : FloatIterator() {
|
||||
private var next = start
|
||||
|
||||
override fun hasNext() = if (increment > 0) next <= end else next >= end
|
||||
|
||||
override fun nextFloat(): Float {
|
||||
val value = next
|
||||
next += increment
|
||||
return value
|
||||
}
|
||||
}
|
||||
|
||||
class DoubleProgressionIterator(start: Double, val end: Double, val increment: Double) : DoubleIterator() {
|
||||
private var next = start
|
||||
|
||||
override fun hasNext() = if (increment > 0) next <= end else next >= end
|
||||
|
||||
override fun nextDouble(): Double {
|
||||
val value = next
|
||||
next += increment
|
||||
return value
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,146 @@
|
||||
// Generated by org.jetbrains.jet.generators.runtime.progressions.GenerateProgressions
|
||||
|
||||
package jet
|
||||
|
||||
public class ByteProgression(
|
||||
public override val start: Byte,
|
||||
public override val end: Byte,
|
||||
public override val increment: Int
|
||||
) : Progression<Byte> {
|
||||
{
|
||||
if (increment == 0) throw IllegalArgumentException("Increment must be non-zero")
|
||||
}
|
||||
|
||||
override fun iterator(): ByteIterator = ByteProgressionIterator(start, end, increment)
|
||||
|
||||
fun equals(other: Any?): Boolean =
|
||||
other is ByteProgression && start == other.start && end == other.end && increment == other.increment
|
||||
|
||||
fun hashCode() = 31 * (31 * start.toInt() + end) + increment
|
||||
|
||||
fun toString() = if (increment > 0) "$start..$end step $increment" else "$start downTo $end step ${-increment}"
|
||||
}
|
||||
|
||||
public class CharProgression(
|
||||
public override val start: Char,
|
||||
public override val end: Char,
|
||||
public override val increment: Int
|
||||
) : Progression<Char> {
|
||||
{
|
||||
if (increment == 0) throw IllegalArgumentException("Increment must be non-zero")
|
||||
}
|
||||
|
||||
override fun iterator(): CharIterator = CharProgressionIterator(start, end, increment)
|
||||
|
||||
fun equals(other: Any?): Boolean =
|
||||
other is CharProgression && start == other.start && end == other.end && increment == other.increment
|
||||
|
||||
fun hashCode() = 31 * (31 * start.toInt() + end) + increment
|
||||
|
||||
fun toString() = if (increment > 0) "$start..$end step $increment" else "$start downTo $end step ${-increment}"
|
||||
}
|
||||
|
||||
public class ShortProgression(
|
||||
public override val start: Short,
|
||||
public override val end: Short,
|
||||
public override val increment: Int
|
||||
) : Progression<Short> {
|
||||
{
|
||||
if (increment == 0) throw IllegalArgumentException("Increment must be non-zero")
|
||||
}
|
||||
|
||||
override fun iterator(): ShortIterator = ShortProgressionIterator(start, end, increment)
|
||||
|
||||
fun equals(other: Any?): Boolean =
|
||||
other is ShortProgression && start == other.start && end == other.end && increment == other.increment
|
||||
|
||||
fun hashCode() = 31 * (31 * start.toInt() + end) + increment
|
||||
|
||||
fun toString() = if (increment > 0) "$start..$end step $increment" else "$start downTo $end step ${-increment}"
|
||||
}
|
||||
|
||||
public class IntProgression(
|
||||
public override val start: Int,
|
||||
public override val end: Int,
|
||||
public override val increment: Int
|
||||
) : Progression<Int> {
|
||||
{
|
||||
if (increment == 0) throw IllegalArgumentException("Increment must be non-zero")
|
||||
}
|
||||
|
||||
override fun iterator(): IntIterator = IntProgressionIterator(start, end, increment)
|
||||
|
||||
fun equals(other: Any?): Boolean =
|
||||
other is IntProgression && start == other.start && end == other.end && increment == other.increment
|
||||
|
||||
fun hashCode() = 31 * (31 * start + end) + increment
|
||||
|
||||
fun toString() = if (increment > 0) "$start..$end step $increment" else "$start downTo $end step ${-increment}"
|
||||
}
|
||||
|
||||
public class LongProgression(
|
||||
public override val start: Long,
|
||||
public override val end: Long,
|
||||
public override val increment: Long
|
||||
) : Progression<Long> {
|
||||
{
|
||||
if (increment == 0L) throw IllegalArgumentException("Increment must be non-zero")
|
||||
}
|
||||
|
||||
override fun iterator(): LongIterator = LongProgressionIterator(start, end, increment)
|
||||
|
||||
fun equals(other: Any?): Boolean =
|
||||
other is LongProgression && start == other.start && end == other.end && increment == other.increment
|
||||
|
||||
fun hashCode() = (31 * (31 * (start xor (start ushr 32)) + (end xor (end ushr 32))) + (increment xor (increment ushr 32))).toInt()
|
||||
|
||||
fun toString() = if (increment > 0) "$start..$end step $increment" else "$start downTo $end step ${-increment}"
|
||||
}
|
||||
|
||||
public class FloatProgression(
|
||||
public override val start: Float,
|
||||
public override val end: Float,
|
||||
public override val increment: Float
|
||||
) : Progression<Float> {
|
||||
{
|
||||
if (java.lang.Float.isNaN(increment)) throw IllegalArgumentException("Increment must be not NaN")
|
||||
if (increment == 0.0f) throw IllegalArgumentException("Increment must be non-zero")
|
||||
}
|
||||
|
||||
override fun iterator(): FloatIterator = FloatProgressionIterator(start, end, increment)
|
||||
|
||||
fun equals(other: Any?): Boolean =
|
||||
other is FloatProgression && java.lang.Float.compare(start, other.start) == 0 && java.lang.Float.compare(end, other.end) == 0 && java.lang.Float.compare(increment, other.increment) == 0
|
||||
|
||||
fun hashCode() = 31 * (31 * java.lang.Float.floatToIntBits(start) + java.lang.Float.floatToIntBits(end)) + java.lang.Float.floatToIntBits(increment)
|
||||
|
||||
fun toString() = if (increment > 0) "$start..$end step $increment" else "$start downTo $end step ${-increment}"
|
||||
}
|
||||
|
||||
public class DoubleProgression(
|
||||
public override val start: Double,
|
||||
public override val end: Double,
|
||||
public override val increment: Double
|
||||
) : Progression<Double> {
|
||||
{
|
||||
if (java.lang.Double.isNaN(increment)) throw IllegalArgumentException("Increment must be not NaN")
|
||||
if (increment == 0.0) throw IllegalArgumentException("Increment must be non-zero")
|
||||
}
|
||||
|
||||
override fun iterator(): DoubleIterator = DoubleProgressionIterator(start, end, increment)
|
||||
|
||||
fun equals(other: Any?): Boolean =
|
||||
other is DoubleProgression && java.lang.Double.compare(start, other.start) == 0 && java.lang.Double.compare(end, other.end) == 0 && java.lang.Double.compare(increment, other.increment) == 0
|
||||
|
||||
fun hashCode(): Int {
|
||||
var temp = java.lang.Double.doubleToLongBits(start)
|
||||
var result = (temp xor (temp ushr 32))
|
||||
temp = java.lang.Double.doubleToLongBits(end)
|
||||
result = 31 * result + (temp xor (temp ushr 32))
|
||||
temp = java.lang.Double.doubleToLongBits(increment)
|
||||
return (31 * result + (temp xor (temp ushr 32))).toInt()
|
||||
}
|
||||
|
||||
fun toString() = if (increment > 0) "$start..$end step $increment" else "$start downTo $end step ${-increment}"
|
||||
}
|
||||
|
||||
@@ -0,0 +1,7 @@
|
||||
package jet
|
||||
|
||||
public trait PropertyMetadata {
|
||||
public val name: String
|
||||
}
|
||||
|
||||
public class PropertyMetadataImpl(public override val name: String): PropertyMetadata
|
||||
@@ -0,0 +1,27 @@
|
||||
/*
|
||||
* Copyright 2010-2014 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.
|
||||
*/
|
||||
|
||||
package jet
|
||||
|
||||
public trait Range<in T : Comparable<T>> {
|
||||
public val start: T
|
||||
|
||||
public val end: T
|
||||
|
||||
public fun contains(item: T): Boolean
|
||||
|
||||
public fun toString(): String = "$start..$end"
|
||||
}
|
||||
@@ -0,0 +1,135 @@
|
||||
// Generated by org.jetbrains.jet.generators.runtime.ranges.GenerateRanges
|
||||
|
||||
package jet
|
||||
|
||||
public class ByteRange(public override val start: Byte, public override val end: Byte) : Range<Byte>, Progression<Byte> {
|
||||
override val increment: Int
|
||||
get() = 1
|
||||
|
||||
override fun contains(item: Byte) = start <= item && item <= end
|
||||
|
||||
override fun iterator(): ByteIterator = ByteProgressionIterator(start, end, 1)
|
||||
|
||||
fun equals(other: Any?): Boolean =
|
||||
other is ByteRange && start == other.start && end == other.end
|
||||
|
||||
fun hashCode() = 31 * start.toInt() + end
|
||||
|
||||
class object {
|
||||
public val EMPTY: ByteRange = ByteRange(1, 0)
|
||||
}
|
||||
}
|
||||
|
||||
public class CharRange(public override val start: Char, public override val end: Char) : Range<Char>, Progression<Char> {
|
||||
override val increment: Int
|
||||
get() = 1
|
||||
|
||||
override fun contains(item: Char) = start <= item && item <= end
|
||||
|
||||
override fun iterator(): CharIterator = CharProgressionIterator(start, end, 1)
|
||||
|
||||
fun equals(other: Any?): Boolean =
|
||||
other is CharRange && start == other.start && end == other.end
|
||||
|
||||
fun hashCode() = 31 * start.toInt() + end
|
||||
|
||||
class object {
|
||||
public val EMPTY: CharRange = CharRange(1.toChar(), 0.toChar())
|
||||
}
|
||||
}
|
||||
|
||||
public class ShortRange(public override val start: Short, public override val end: Short) : Range<Short>, Progression<Short> {
|
||||
override val increment: Int
|
||||
get() = 1
|
||||
|
||||
override fun contains(item: Short) = start <= item && item <= end
|
||||
|
||||
override fun iterator(): ShortIterator = ShortProgressionIterator(start, end, 1)
|
||||
|
||||
fun equals(other: Any?): Boolean =
|
||||
other is ShortRange && start == other.start && end == other.end
|
||||
|
||||
fun hashCode() = 31 * start.toInt() + end
|
||||
|
||||
class object {
|
||||
public val EMPTY: ShortRange = ShortRange(1, 0)
|
||||
}
|
||||
}
|
||||
|
||||
public class IntRange(public override val start: Int, public override val end: Int) : Range<Int>, Progression<Int> {
|
||||
override val increment: Int
|
||||
get() = 1
|
||||
|
||||
override fun contains(item: Int) = start <= item && item <= end
|
||||
|
||||
override fun iterator(): IntIterator = IntProgressionIterator(start, end, 1)
|
||||
|
||||
fun equals(other: Any?): Boolean =
|
||||
other is IntRange && start == other.start && end == other.end
|
||||
|
||||
fun hashCode() = 31 * start + end
|
||||
|
||||
class object {
|
||||
public val EMPTY: IntRange = IntRange(1, 0)
|
||||
}
|
||||
}
|
||||
|
||||
public class LongRange(public override val start: Long, public override val end: Long) : Range<Long>, Progression<Long> {
|
||||
override val increment: Long
|
||||
get() = 1
|
||||
|
||||
override fun contains(item: Long) = start <= item && item <= end
|
||||
|
||||
override fun iterator(): LongIterator = LongProgressionIterator(start, end, 1)
|
||||
|
||||
fun equals(other: Any?): Boolean =
|
||||
other is LongRange && start == other.start && end == other.end
|
||||
|
||||
fun hashCode() = (31 * (start xor (start ushr 32)) + (end xor (end ushr 32))).toInt()
|
||||
|
||||
class object {
|
||||
public val EMPTY: LongRange = LongRange(1, 0)
|
||||
}
|
||||
}
|
||||
|
||||
public class FloatRange(public override val start: Float, public override val end: Float) : Range<Float>, Progression<Float> {
|
||||
override val increment: Float
|
||||
get() = 1.0f
|
||||
|
||||
override fun contains(item: Float) = start <= item && item <= end
|
||||
|
||||
override fun iterator(): FloatIterator = FloatProgressionIterator(start, end, 1.0f)
|
||||
|
||||
fun equals(other: Any?): Boolean =
|
||||
other is FloatRange && java.lang.Float.compare(start, other.start) == 0 && java.lang.Float.compare(end, other.end) == 0
|
||||
|
||||
fun hashCode() = 31 * java.lang.Float.floatToIntBits(start) + java.lang.Float.floatToIntBits(end)
|
||||
|
||||
class object {
|
||||
public val EMPTY: FloatRange = FloatRange(1.0f, 0.0f)
|
||||
}
|
||||
}
|
||||
|
||||
public class DoubleRange(public override val start: Double, public override val end: Double) : Range<Double>, Progression<Double> {
|
||||
override val increment: Double
|
||||
get() = 1.0
|
||||
|
||||
override fun contains(item: Double) = start <= item && item <= end
|
||||
|
||||
override fun iterator(): DoubleIterator = DoubleProgressionIterator(start, end, 1.0)
|
||||
|
||||
fun equals(other: Any?): Boolean =
|
||||
other is DoubleRange && java.lang.Double.compare(start, other.start) == 0 && java.lang.Double.compare(end, other.end) == 0
|
||||
|
||||
fun hashCode(): Int {
|
||||
var temp = java.lang.Double.doubleToLongBits(start)
|
||||
val result = (temp xor (temp ushr 32))
|
||||
temp = java.lang.Double.doubleToLongBits(end)
|
||||
return (31 * result + (temp xor (temp ushr 32))).toInt()
|
||||
}
|
||||
|
||||
class object {
|
||||
public val EMPTY: DoubleRange = DoubleRange(1.0, 0.0)
|
||||
}
|
||||
}
|
||||
|
||||
@@ -0,0 +1,27 @@
|
||||
/*
|
||||
* Copyright 2010-2014 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.
|
||||
*/
|
||||
|
||||
package jet
|
||||
|
||||
public class Unit private() {
|
||||
fun toString() = "Unit.VALUE"
|
||||
|
||||
class object {
|
||||
// TODO: remove suppression after a successful bootstrap
|
||||
suppress("INVISIBLE_MEMBER")
|
||||
public val VALUE: Unit = Unit()
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,85 @@
|
||||
/*
|
||||
* Copyright 2010-2013 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.
|
||||
*/
|
||||
|
||||
package jet.runtime;
|
||||
|
||||
public class ProgressionUtil {
|
||||
private ProgressionUtil() {
|
||||
}
|
||||
|
||||
// a mod b (in arithmetical sense)
|
||||
private static int mod(int a, int b) {
|
||||
int mod = a % b;
|
||||
return mod >= 0 ? mod : mod + b;
|
||||
}
|
||||
|
||||
private static long mod(long a, long b) {
|
||||
long mod = a % b;
|
||||
return mod >= 0 ? mod : mod + b;
|
||||
}
|
||||
|
||||
// (a - b) mod c
|
||||
private static int differenceModulo(int a, int b, int c) {
|
||||
return mod(mod(a, c) - mod(b, c), c);
|
||||
}
|
||||
|
||||
private static long differenceModulo(long a, long b, long c) {
|
||||
return mod(mod(a, c) - mod(b, c), c);
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* Calculates the final element of a bounded arithmetic progression, i.e. the last element of the progression which is in the range
|
||||
* from {@code start} to {@code end} in case of a positive {@code increment}, or from {@code end} to {@code start} in case of a negative
|
||||
* increment.
|
||||
*
|
||||
* <p>No validation on passed parameters is performed. The given parameters should satisfy the condition: either
|
||||
* {@code increment > 0} and {@code start <= end}, or {@code increment < 0} and {@code start >= end}.
|
||||
* @param start first element of the progression
|
||||
* @param end ending bound for the progression
|
||||
* @param increment increment, or difference of successive elements in the progression
|
||||
* @return the final element of the progression
|
||||
*/
|
||||
public static int getProgressionFinalElement(int start, int end, int increment) {
|
||||
if (increment > 0) {
|
||||
return end - differenceModulo(end, start, increment);
|
||||
}
|
||||
else {
|
||||
return end + differenceModulo(start, end, -increment);
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Calculates the final element of a bounded arithmetic progression, i.e. the last element of the progression which is in the range
|
||||
* from {@code start} to {@code end} in case of a positive {@code increment}, or from {@code end} to {@code start} in case of a negative
|
||||
* increment.
|
||||
*
|
||||
* <p>No validation on passed parameters is performed. The given parameters should satisfy the condition: either
|
||||
* {@code increment > 0} and {@code start <= end}, or {@code increment < 0} and {@code start >= end}.
|
||||
* @param start first element of the progression
|
||||
* @param end ending bound for the progression
|
||||
* @param increment increment, or difference of successive elements in the progression
|
||||
* @return the final element of the progression
|
||||
*/
|
||||
public static long getProgressionFinalElement(long start, long end, long increment) {
|
||||
if (increment > 0) {
|
||||
return end - differenceModulo(end, start, increment);
|
||||
}
|
||||
else {
|
||||
return end + differenceModulo(start, end, -increment);
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,13 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<module type="JAVA_MODULE" version="4">
|
||||
<component name="NewModuleRootManager" inherit-compiler-output="true">
|
||||
<exclude-output />
|
||||
<content url="file://$MODULE_DIR$">
|
||||
<sourceFolder url="file://$MODULE_DIR$/src" isTestSource="false" />
|
||||
</content>
|
||||
<orderEntry type="inheritedJdk" />
|
||||
<orderEntry type="sourceFolder" forTests="false" />
|
||||
<orderEntry type="module" module-name="builtins" />
|
||||
</component>
|
||||
</module>
|
||||
|
||||
@@ -0,0 +1,24 @@
|
||||
/*
|
||||
* Copyright 2010-2013 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.
|
||||
*/
|
||||
|
||||
package jet;
|
||||
|
||||
import java.io.Serializable;
|
||||
|
||||
public class DefaultJetObject implements Serializable {
|
||||
protected DefaultJetObject() {
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,73 @@
|
||||
// Generated by org.jetbrains.jet.generators.runtime.functions.GenerateFunctions
|
||||
|
||||
package jet
|
||||
|
||||
public abstract class ExtensionFunctionImpl0<in T, out R> : ExtensionFunction0<T, R>, DefaultJetObject() {
|
||||
override fun toString() = "${getClass().getGenericSuperclass()}"
|
||||
}
|
||||
public abstract class ExtensionFunctionImpl1<in T, in P1, out R> : ExtensionFunction1<T, P1, R>, DefaultJetObject() {
|
||||
override fun toString() = "${getClass().getGenericSuperclass()}"
|
||||
}
|
||||
public abstract class ExtensionFunctionImpl2<in T, in P1, in P2, out R> : ExtensionFunction2<T, P1, P2, R>, DefaultJetObject() {
|
||||
override fun toString() = "${getClass().getGenericSuperclass()}"
|
||||
}
|
||||
public abstract class ExtensionFunctionImpl3<in T, in P1, in P2, in P3, out R> : ExtensionFunction3<T, P1, P2, P3, R>, DefaultJetObject() {
|
||||
override fun toString() = "${getClass().getGenericSuperclass()}"
|
||||
}
|
||||
public abstract class ExtensionFunctionImpl4<in T, in P1, in P2, in P3, in P4, out R> : ExtensionFunction4<T, P1, P2, P3, P4, R>, DefaultJetObject() {
|
||||
override fun toString() = "${getClass().getGenericSuperclass()}"
|
||||
}
|
||||
public abstract class ExtensionFunctionImpl5<in T, in P1, in P2, in P3, in P4, in P5, out R> : ExtensionFunction5<T, P1, P2, P3, P4, P5, R>, DefaultJetObject() {
|
||||
override fun toString() = "${getClass().getGenericSuperclass()}"
|
||||
}
|
||||
public abstract class ExtensionFunctionImpl6<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>, DefaultJetObject() {
|
||||
override fun toString() = "${getClass().getGenericSuperclass()}"
|
||||
}
|
||||
public abstract class ExtensionFunctionImpl7<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>, DefaultJetObject() {
|
||||
override fun toString() = "${getClass().getGenericSuperclass()}"
|
||||
}
|
||||
public abstract class ExtensionFunctionImpl8<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>, DefaultJetObject() {
|
||||
override fun toString() = "${getClass().getGenericSuperclass()}"
|
||||
}
|
||||
public abstract class ExtensionFunctionImpl9<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>, DefaultJetObject() {
|
||||
override fun toString() = "${getClass().getGenericSuperclass()}"
|
||||
}
|
||||
public abstract class ExtensionFunctionImpl10<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>, DefaultJetObject() {
|
||||
override fun toString() = "${getClass().getGenericSuperclass()}"
|
||||
}
|
||||
public abstract class ExtensionFunctionImpl11<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>, DefaultJetObject() {
|
||||
override fun toString() = "${getClass().getGenericSuperclass()}"
|
||||
}
|
||||
public abstract class ExtensionFunctionImpl12<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>, DefaultJetObject() {
|
||||
override fun toString() = "${getClass().getGenericSuperclass()}"
|
||||
}
|
||||
public abstract class ExtensionFunctionImpl13<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>, DefaultJetObject() {
|
||||
override fun toString() = "${getClass().getGenericSuperclass()}"
|
||||
}
|
||||
public abstract class ExtensionFunctionImpl14<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>, DefaultJetObject() {
|
||||
override fun toString() = "${getClass().getGenericSuperclass()}"
|
||||
}
|
||||
public abstract class ExtensionFunctionImpl15<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>, DefaultJetObject() {
|
||||
override fun toString() = "${getClass().getGenericSuperclass()}"
|
||||
}
|
||||
public abstract class ExtensionFunctionImpl16<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>, DefaultJetObject() {
|
||||
override fun toString() = "${getClass().getGenericSuperclass()}"
|
||||
}
|
||||
public abstract class ExtensionFunctionImpl17<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>, DefaultJetObject() {
|
||||
override fun toString() = "${getClass().getGenericSuperclass()}"
|
||||
}
|
||||
public abstract class ExtensionFunctionImpl18<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>, DefaultJetObject() {
|
||||
override fun toString() = "${getClass().getGenericSuperclass()}"
|
||||
}
|
||||
public abstract class ExtensionFunctionImpl19<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>, DefaultJetObject() {
|
||||
override fun toString() = "${getClass().getGenericSuperclass()}"
|
||||
}
|
||||
public abstract class ExtensionFunctionImpl20<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>, DefaultJetObject() {
|
||||
override fun toString() = "${getClass().getGenericSuperclass()}"
|
||||
}
|
||||
public abstract class ExtensionFunctionImpl21<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>, DefaultJetObject() {
|
||||
override fun toString() = "${getClass().getGenericSuperclass()}"
|
||||
}
|
||||
public abstract class ExtensionFunctionImpl22<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>, DefaultJetObject() {
|
||||
override fun toString() = "${getClass().getGenericSuperclass()}"
|
||||
}
|
||||
@@ -0,0 +1,73 @@
|
||||
// Generated by org.jetbrains.jet.generators.runtime.functions.GenerateFunctions
|
||||
|
||||
package jet
|
||||
|
||||
public abstract class FunctionImpl0<out R> : Function0<R>, DefaultJetObject() {
|
||||
override fun toString() = "${getClass().getGenericSuperclass()}"
|
||||
}
|
||||
public abstract class FunctionImpl1<in P1, out R> : Function1<P1, R>, DefaultJetObject() {
|
||||
override fun toString() = "${getClass().getGenericSuperclass()}"
|
||||
}
|
||||
public abstract class FunctionImpl2<in P1, in P2, out R> : Function2<P1, P2, R>, DefaultJetObject() {
|
||||
override fun toString() = "${getClass().getGenericSuperclass()}"
|
||||
}
|
||||
public abstract class FunctionImpl3<in P1, in P2, in P3, out R> : Function3<P1, P2, P3, R>, DefaultJetObject() {
|
||||
override fun toString() = "${getClass().getGenericSuperclass()}"
|
||||
}
|
||||
public abstract class FunctionImpl4<in P1, in P2, in P3, in P4, out R> : Function4<P1, P2, P3, P4, R>, DefaultJetObject() {
|
||||
override fun toString() = "${getClass().getGenericSuperclass()}"
|
||||
}
|
||||
public abstract class FunctionImpl5<in P1, in P2, in P3, in P4, in P5, out R> : Function5<P1, P2, P3, P4, P5, R>, DefaultJetObject() {
|
||||
override fun toString() = "${getClass().getGenericSuperclass()}"
|
||||
}
|
||||
public abstract class FunctionImpl6<in P1, in P2, in P3, in P4, in P5, in P6, out R> : Function6<P1, P2, P3, P4, P5, P6, R>, DefaultJetObject() {
|
||||
override fun toString() = "${getClass().getGenericSuperclass()}"
|
||||
}
|
||||
public abstract class FunctionImpl7<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>, DefaultJetObject() {
|
||||
override fun toString() = "${getClass().getGenericSuperclass()}"
|
||||
}
|
||||
public abstract class FunctionImpl8<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>, DefaultJetObject() {
|
||||
override fun toString() = "${getClass().getGenericSuperclass()}"
|
||||
}
|
||||
public abstract class FunctionImpl9<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>, DefaultJetObject() {
|
||||
override fun toString() = "${getClass().getGenericSuperclass()}"
|
||||
}
|
||||
public abstract class FunctionImpl10<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>, DefaultJetObject() {
|
||||
override fun toString() = "${getClass().getGenericSuperclass()}"
|
||||
}
|
||||
public abstract class FunctionImpl11<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>, DefaultJetObject() {
|
||||
override fun toString() = "${getClass().getGenericSuperclass()}"
|
||||
}
|
||||
public abstract class FunctionImpl12<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>, DefaultJetObject() {
|
||||
override fun toString() = "${getClass().getGenericSuperclass()}"
|
||||
}
|
||||
public abstract class FunctionImpl13<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>, DefaultJetObject() {
|
||||
override fun toString() = "${getClass().getGenericSuperclass()}"
|
||||
}
|
||||
public abstract class FunctionImpl14<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>, DefaultJetObject() {
|
||||
override fun toString() = "${getClass().getGenericSuperclass()}"
|
||||
}
|
||||
public abstract class FunctionImpl15<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>, DefaultJetObject() {
|
||||
override fun toString() = "${getClass().getGenericSuperclass()}"
|
||||
}
|
||||
public abstract class FunctionImpl16<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>, DefaultJetObject() {
|
||||
override fun toString() = "${getClass().getGenericSuperclass()}"
|
||||
}
|
||||
public abstract class FunctionImpl17<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>, DefaultJetObject() {
|
||||
override fun toString() = "${getClass().getGenericSuperclass()}"
|
||||
}
|
||||
public abstract class FunctionImpl18<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>, DefaultJetObject() {
|
||||
override fun toString() = "${getClass().getGenericSuperclass()}"
|
||||
}
|
||||
public abstract class FunctionImpl19<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>, DefaultJetObject() {
|
||||
override fun toString() = "${getClass().getGenericSuperclass()}"
|
||||
}
|
||||
public abstract class FunctionImpl20<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>, DefaultJetObject() {
|
||||
override fun toString() = "${getClass().getGenericSuperclass()}"
|
||||
}
|
||||
public abstract class FunctionImpl21<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>, DefaultJetObject() {
|
||||
override fun toString() = "${getClass().getGenericSuperclass()}"
|
||||
}
|
||||
public abstract class FunctionImpl22<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>, DefaultJetObject() {
|
||||
override fun toString() = "${getClass().getGenericSuperclass()}"
|
||||
}
|
||||
@@ -0,0 +1,20 @@
|
||||
/*
|
||||
* Copyright 2010-2013 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.
|
||||
*/
|
||||
|
||||
package jet;
|
||||
|
||||
public interface JetObject {
|
||||
}
|
||||
@@ -0,0 +1,73 @@
|
||||
// Generated by org.jetbrains.jet.generators.runtime.functions.GenerateFunctions
|
||||
|
||||
package jet
|
||||
|
||||
public abstract class KExtensionFunctionImpl0<in T, out R> : KExtensionFunction0<T, R>, DefaultJetObject() {
|
||||
override fun toString() = "${getClass().getGenericSuperclass()}"
|
||||
}
|
||||
public abstract class KExtensionFunctionImpl1<in T, in P1, out R> : KExtensionFunction1<T, P1, R>, DefaultJetObject() {
|
||||
override fun toString() = "${getClass().getGenericSuperclass()}"
|
||||
}
|
||||
public abstract class KExtensionFunctionImpl2<in T, in P1, in P2, out R> : KExtensionFunction2<T, P1, P2, R>, DefaultJetObject() {
|
||||
override fun toString() = "${getClass().getGenericSuperclass()}"
|
||||
}
|
||||
public abstract class KExtensionFunctionImpl3<in T, in P1, in P2, in P3, out R> : KExtensionFunction3<T, P1, P2, P3, R>, DefaultJetObject() {
|
||||
override fun toString() = "${getClass().getGenericSuperclass()}"
|
||||
}
|
||||
public abstract class KExtensionFunctionImpl4<in T, in P1, in P2, in P3, in P4, out R> : KExtensionFunction4<T, P1, P2, P3, P4, R>, DefaultJetObject() {
|
||||
override fun toString() = "${getClass().getGenericSuperclass()}"
|
||||
}
|
||||
public abstract class KExtensionFunctionImpl5<in T, in P1, in P2, in P3, in P4, in P5, out R> : KExtensionFunction5<T, P1, P2, P3, P4, P5, R>, DefaultJetObject() {
|
||||
override fun toString() = "${getClass().getGenericSuperclass()}"
|
||||
}
|
||||
public abstract class KExtensionFunctionImpl6<in T, in P1, in P2, in P3, in P4, in P5, in P6, out R> : KExtensionFunction6<T, P1, P2, P3, P4, P5, P6, R>, DefaultJetObject() {
|
||||
override fun toString() = "${getClass().getGenericSuperclass()}"
|
||||
}
|
||||
public abstract class KExtensionFunctionImpl7<in T, in P1, in P2, in P3, in P4, in P5, in P6, in P7, out R> : KExtensionFunction7<T, P1, P2, P3, P4, P5, P6, P7, R>, DefaultJetObject() {
|
||||
override fun toString() = "${getClass().getGenericSuperclass()}"
|
||||
}
|
||||
public abstract class KExtensionFunctionImpl8<in T, in P1, in P2, in P3, in P4, in P5, in P6, in P7, in P8, out R> : KExtensionFunction8<T, P1, P2, P3, P4, P5, P6, P7, P8, R>, DefaultJetObject() {
|
||||
override fun toString() = "${getClass().getGenericSuperclass()}"
|
||||
}
|
||||
public abstract class KExtensionFunctionImpl9<in T, in P1, in P2, in P3, in P4, in P5, in P6, in P7, in P8, in P9, out R> : KExtensionFunction9<T, P1, P2, P3, P4, P5, P6, P7, P8, P9, R>, DefaultJetObject() {
|
||||
override fun toString() = "${getClass().getGenericSuperclass()}"
|
||||
}
|
||||
public abstract class KExtensionFunctionImpl10<in T, in P1, in P2, in P3, in P4, in P5, in P6, in P7, in P8, in P9, in P10, out R> : KExtensionFunction10<T, P1, P2, P3, P4, P5, P6, P7, P8, P9, P10, R>, DefaultJetObject() {
|
||||
override fun toString() = "${getClass().getGenericSuperclass()}"
|
||||
}
|
||||
public abstract class KExtensionFunctionImpl11<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> : KExtensionFunction11<T, P1, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, R>, DefaultJetObject() {
|
||||
override fun toString() = "${getClass().getGenericSuperclass()}"
|
||||
}
|
||||
public abstract class KExtensionFunctionImpl12<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> : KExtensionFunction12<T, P1, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, R>, DefaultJetObject() {
|
||||
override fun toString() = "${getClass().getGenericSuperclass()}"
|
||||
}
|
||||
public abstract class KExtensionFunctionImpl13<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> : KExtensionFunction13<T, P1, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, R>, DefaultJetObject() {
|
||||
override fun toString() = "${getClass().getGenericSuperclass()}"
|
||||
}
|
||||
public abstract class KExtensionFunctionImpl14<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> : KExtensionFunction14<T, P1, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, R>, DefaultJetObject() {
|
||||
override fun toString() = "${getClass().getGenericSuperclass()}"
|
||||
}
|
||||
public abstract class KExtensionFunctionImpl15<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> : KExtensionFunction15<T, P1, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, R>, DefaultJetObject() {
|
||||
override fun toString() = "${getClass().getGenericSuperclass()}"
|
||||
}
|
||||
public abstract class KExtensionFunctionImpl16<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> : KExtensionFunction16<T, P1, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, R>, DefaultJetObject() {
|
||||
override fun toString() = "${getClass().getGenericSuperclass()}"
|
||||
}
|
||||
public abstract class KExtensionFunctionImpl17<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> : KExtensionFunction17<T, P1, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, R>, DefaultJetObject() {
|
||||
override fun toString() = "${getClass().getGenericSuperclass()}"
|
||||
}
|
||||
public abstract class KExtensionFunctionImpl18<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> : KExtensionFunction18<T, P1, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, P18, R>, DefaultJetObject() {
|
||||
override fun toString() = "${getClass().getGenericSuperclass()}"
|
||||
}
|
||||
public abstract class KExtensionFunctionImpl19<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> : KExtensionFunction19<T, P1, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, P18, P19, R>, DefaultJetObject() {
|
||||
override fun toString() = "${getClass().getGenericSuperclass()}"
|
||||
}
|
||||
public abstract class KExtensionFunctionImpl20<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> : KExtensionFunction20<T, P1, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, P18, P19, P20, R>, DefaultJetObject() {
|
||||
override fun toString() = "${getClass().getGenericSuperclass()}"
|
||||
}
|
||||
public abstract class KExtensionFunctionImpl21<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> : KExtensionFunction21<T, P1, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, P18, P19, P20, P21, R>, DefaultJetObject() {
|
||||
override fun toString() = "${getClass().getGenericSuperclass()}"
|
||||
}
|
||||
public abstract class KExtensionFunctionImpl22<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> : KExtensionFunction22<T, P1, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, P18, P19, P20, P21, P22, R>, DefaultJetObject() {
|
||||
override fun toString() = "${getClass().getGenericSuperclass()}"
|
||||
}
|
||||
@@ -0,0 +1,73 @@
|
||||
// Generated by org.jetbrains.jet.generators.runtime.functions.GenerateFunctions
|
||||
|
||||
package jet
|
||||
|
||||
public abstract class KFunctionImpl0<out R> : KFunction0<R>, DefaultJetObject() {
|
||||
override fun toString() = "${getClass().getGenericSuperclass()}"
|
||||
}
|
||||
public abstract class KFunctionImpl1<in P1, out R> : KFunction1<P1, R>, DefaultJetObject() {
|
||||
override fun toString() = "${getClass().getGenericSuperclass()}"
|
||||
}
|
||||
public abstract class KFunctionImpl2<in P1, in P2, out R> : KFunction2<P1, P2, R>, DefaultJetObject() {
|
||||
override fun toString() = "${getClass().getGenericSuperclass()}"
|
||||
}
|
||||
public abstract class KFunctionImpl3<in P1, in P2, in P3, out R> : KFunction3<P1, P2, P3, R>, DefaultJetObject() {
|
||||
override fun toString() = "${getClass().getGenericSuperclass()}"
|
||||
}
|
||||
public abstract class KFunctionImpl4<in P1, in P2, in P3, in P4, out R> : KFunction4<P1, P2, P3, P4, R>, DefaultJetObject() {
|
||||
override fun toString() = "${getClass().getGenericSuperclass()}"
|
||||
}
|
||||
public abstract class KFunctionImpl5<in P1, in P2, in P3, in P4, in P5, out R> : KFunction5<P1, P2, P3, P4, P5, R>, DefaultJetObject() {
|
||||
override fun toString() = "${getClass().getGenericSuperclass()}"
|
||||
}
|
||||
public abstract class KFunctionImpl6<in P1, in P2, in P3, in P4, in P5, in P6, out R> : KFunction6<P1, P2, P3, P4, P5, P6, R>, DefaultJetObject() {
|
||||
override fun toString() = "${getClass().getGenericSuperclass()}"
|
||||
}
|
||||
public abstract class KFunctionImpl7<in P1, in P2, in P3, in P4, in P5, in P6, in P7, out R> : KFunction7<P1, P2, P3, P4, P5, P6, P7, R>, DefaultJetObject() {
|
||||
override fun toString() = "${getClass().getGenericSuperclass()}"
|
||||
}
|
||||
public abstract class KFunctionImpl8<in P1, in P2, in P3, in P4, in P5, in P6, in P7, in P8, out R> : KFunction8<P1, P2, P3, P4, P5, P6, P7, P8, R>, DefaultJetObject() {
|
||||
override fun toString() = "${getClass().getGenericSuperclass()}"
|
||||
}
|
||||
public abstract class KFunctionImpl9<in P1, in P2, in P3, in P4, in P5, in P6, in P7, in P8, in P9, out R> : KFunction9<P1, P2, P3, P4, P5, P6, P7, P8, P9, R>, DefaultJetObject() {
|
||||
override fun toString() = "${getClass().getGenericSuperclass()}"
|
||||
}
|
||||
public abstract class KFunctionImpl10<in P1, in P2, in P3, in P4, in P5, in P6, in P7, in P8, in P9, in P10, out R> : KFunction10<P1, P2, P3, P4, P5, P6, P7, P8, P9, P10, R>, DefaultJetObject() {
|
||||
override fun toString() = "${getClass().getGenericSuperclass()}"
|
||||
}
|
||||
public abstract class KFunctionImpl11<in P1, in P2, in P3, in P4, in P5, in P6, in P7, in P8, in P9, in P10, in P11, out R> : KFunction11<P1, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, R>, DefaultJetObject() {
|
||||
override fun toString() = "${getClass().getGenericSuperclass()}"
|
||||
}
|
||||
public abstract class KFunctionImpl12<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> : KFunction12<P1, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, R>, DefaultJetObject() {
|
||||
override fun toString() = "${getClass().getGenericSuperclass()}"
|
||||
}
|
||||
public abstract class KFunctionImpl13<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> : KFunction13<P1, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, R>, DefaultJetObject() {
|
||||
override fun toString() = "${getClass().getGenericSuperclass()}"
|
||||
}
|
||||
public abstract class KFunctionImpl14<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> : KFunction14<P1, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, R>, DefaultJetObject() {
|
||||
override fun toString() = "${getClass().getGenericSuperclass()}"
|
||||
}
|
||||
public abstract class KFunctionImpl15<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> : KFunction15<P1, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, R>, DefaultJetObject() {
|
||||
override fun toString() = "${getClass().getGenericSuperclass()}"
|
||||
}
|
||||
public abstract class KFunctionImpl16<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> : KFunction16<P1, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, R>, DefaultJetObject() {
|
||||
override fun toString() = "${getClass().getGenericSuperclass()}"
|
||||
}
|
||||
public abstract class KFunctionImpl17<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> : KFunction17<P1, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, R>, DefaultJetObject() {
|
||||
override fun toString() = "${getClass().getGenericSuperclass()}"
|
||||
}
|
||||
public abstract class KFunctionImpl18<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> : KFunction18<P1, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, P18, R>, DefaultJetObject() {
|
||||
override fun toString() = "${getClass().getGenericSuperclass()}"
|
||||
}
|
||||
public abstract class KFunctionImpl19<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> : KFunction19<P1, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, P18, P19, R>, DefaultJetObject() {
|
||||
override fun toString() = "${getClass().getGenericSuperclass()}"
|
||||
}
|
||||
public abstract class KFunctionImpl20<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> : KFunction20<P1, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, P18, P19, P20, R>, DefaultJetObject() {
|
||||
override fun toString() = "${getClass().getGenericSuperclass()}"
|
||||
}
|
||||
public abstract class KFunctionImpl21<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> : KFunction21<P1, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, P18, P19, P20, P21, R>, DefaultJetObject() {
|
||||
override fun toString() = "${getClass().getGenericSuperclass()}"
|
||||
}
|
||||
public abstract class KFunctionImpl22<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> : KFunction22<P1, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, P18, P19, P20, P21, P22, R>, DefaultJetObject() {
|
||||
override fun toString() = "${getClass().getGenericSuperclass()}"
|
||||
}
|
||||
@@ -0,0 +1,73 @@
|
||||
// Generated by org.jetbrains.jet.generators.runtime.functions.GenerateFunctions
|
||||
|
||||
package jet
|
||||
|
||||
public abstract class KMemberFunctionImpl0<in T, out R> : KMemberFunction0<T, R>, DefaultJetObject() {
|
||||
override fun toString() = "${getClass().getGenericSuperclass()}"
|
||||
}
|
||||
public abstract class KMemberFunctionImpl1<in T, in P1, out R> : KMemberFunction1<T, P1, R>, DefaultJetObject() {
|
||||
override fun toString() = "${getClass().getGenericSuperclass()}"
|
||||
}
|
||||
public abstract class KMemberFunctionImpl2<in T, in P1, in P2, out R> : KMemberFunction2<T, P1, P2, R>, DefaultJetObject() {
|
||||
override fun toString() = "${getClass().getGenericSuperclass()}"
|
||||
}
|
||||
public abstract class KMemberFunctionImpl3<in T, in P1, in P2, in P3, out R> : KMemberFunction3<T, P1, P2, P3, R>, DefaultJetObject() {
|
||||
override fun toString() = "${getClass().getGenericSuperclass()}"
|
||||
}
|
||||
public abstract class KMemberFunctionImpl4<in T, in P1, in P2, in P3, in P4, out R> : KMemberFunction4<T, P1, P2, P3, P4, R>, DefaultJetObject() {
|
||||
override fun toString() = "${getClass().getGenericSuperclass()}"
|
||||
}
|
||||
public abstract class KMemberFunctionImpl5<in T, in P1, in P2, in P3, in P4, in P5, out R> : KMemberFunction5<T, P1, P2, P3, P4, P5, R>, DefaultJetObject() {
|
||||
override fun toString() = "${getClass().getGenericSuperclass()}"
|
||||
}
|
||||
public abstract class KMemberFunctionImpl6<in T, in P1, in P2, in P3, in P4, in P5, in P6, out R> : KMemberFunction6<T, P1, P2, P3, P4, P5, P6, R>, DefaultJetObject() {
|
||||
override fun toString() = "${getClass().getGenericSuperclass()}"
|
||||
}
|
||||
public abstract class KMemberFunctionImpl7<in T, in P1, in P2, in P3, in P4, in P5, in P6, in P7, out R> : KMemberFunction7<T, P1, P2, P3, P4, P5, P6, P7, R>, DefaultJetObject() {
|
||||
override fun toString() = "${getClass().getGenericSuperclass()}"
|
||||
}
|
||||
public abstract class KMemberFunctionImpl8<in T, in P1, in P2, in P3, in P4, in P5, in P6, in P7, in P8, out R> : KMemberFunction8<T, P1, P2, P3, P4, P5, P6, P7, P8, R>, DefaultJetObject() {
|
||||
override fun toString() = "${getClass().getGenericSuperclass()}"
|
||||
}
|
||||
public abstract class KMemberFunctionImpl9<in T, in P1, in P2, in P3, in P4, in P5, in P6, in P7, in P8, in P9, out R> : KMemberFunction9<T, P1, P2, P3, P4, P5, P6, P7, P8, P9, R>, DefaultJetObject() {
|
||||
override fun toString() = "${getClass().getGenericSuperclass()}"
|
||||
}
|
||||
public abstract class KMemberFunctionImpl10<in T, in P1, in P2, in P3, in P4, in P5, in P6, in P7, in P8, in P9, in P10, out R> : KMemberFunction10<T, P1, P2, P3, P4, P5, P6, P7, P8, P9, P10, R>, DefaultJetObject() {
|
||||
override fun toString() = "${getClass().getGenericSuperclass()}"
|
||||
}
|
||||
public abstract class KMemberFunctionImpl11<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> : KMemberFunction11<T, P1, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, R>, DefaultJetObject() {
|
||||
override fun toString() = "${getClass().getGenericSuperclass()}"
|
||||
}
|
||||
public abstract class KMemberFunctionImpl12<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> : KMemberFunction12<T, P1, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, R>, DefaultJetObject() {
|
||||
override fun toString() = "${getClass().getGenericSuperclass()}"
|
||||
}
|
||||
public abstract class KMemberFunctionImpl13<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> : KMemberFunction13<T, P1, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, R>, DefaultJetObject() {
|
||||
override fun toString() = "${getClass().getGenericSuperclass()}"
|
||||
}
|
||||
public abstract class KMemberFunctionImpl14<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> : KMemberFunction14<T, P1, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, R>, DefaultJetObject() {
|
||||
override fun toString() = "${getClass().getGenericSuperclass()}"
|
||||
}
|
||||
public abstract class KMemberFunctionImpl15<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> : KMemberFunction15<T, P1, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, R>, DefaultJetObject() {
|
||||
override fun toString() = "${getClass().getGenericSuperclass()}"
|
||||
}
|
||||
public abstract class KMemberFunctionImpl16<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> : KMemberFunction16<T, P1, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, R>, DefaultJetObject() {
|
||||
override fun toString() = "${getClass().getGenericSuperclass()}"
|
||||
}
|
||||
public abstract class KMemberFunctionImpl17<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> : KMemberFunction17<T, P1, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, R>, DefaultJetObject() {
|
||||
override fun toString() = "${getClass().getGenericSuperclass()}"
|
||||
}
|
||||
public abstract class KMemberFunctionImpl18<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> : KMemberFunction18<T, P1, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, P18, R>, DefaultJetObject() {
|
||||
override fun toString() = "${getClass().getGenericSuperclass()}"
|
||||
}
|
||||
public abstract class KMemberFunctionImpl19<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> : KMemberFunction19<T, P1, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, P18, P19, R>, DefaultJetObject() {
|
||||
override fun toString() = "${getClass().getGenericSuperclass()}"
|
||||
}
|
||||
public abstract class KMemberFunctionImpl20<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> : KMemberFunction20<T, P1, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, P18, P19, P20, R>, DefaultJetObject() {
|
||||
override fun toString() = "${getClass().getGenericSuperclass()}"
|
||||
}
|
||||
public abstract class KMemberFunctionImpl21<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> : KMemberFunction21<T, P1, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, P18, P19, P20, P21, R>, DefaultJetObject() {
|
||||
override fun toString() = "${getClass().getGenericSuperclass()}"
|
||||
}
|
||||
public abstract class KMemberFunctionImpl22<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> : KMemberFunction22<T, P1, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, P18, P19, P20, P21, P22, R>, DefaultJetObject() {
|
||||
override fun toString() = "${getClass().getGenericSuperclass()}"
|
||||
}
|
||||
@@ -0,0 +1,27 @@
|
||||
/*
|
||||
* Copyright 2010-2013 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.
|
||||
*/
|
||||
|
||||
package jet;
|
||||
|
||||
import java.lang.annotation.Retention;
|
||||
import java.lang.annotation.RetentionPolicy;
|
||||
|
||||
@Retention(RetentionPolicy.RUNTIME)
|
||||
public @interface KotlinClass {
|
||||
int abiVersion();
|
||||
|
||||
String[] data();
|
||||
}
|
||||
@@ -0,0 +1,27 @@
|
||||
/*
|
||||
* Copyright 2010-2013 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.
|
||||
*/
|
||||
|
||||
package jet;
|
||||
|
||||
import java.lang.annotation.Retention;
|
||||
import java.lang.annotation.RetentionPolicy;
|
||||
|
||||
@Retention(RetentionPolicy.RUNTIME)
|
||||
public @interface KotlinPackage {
|
||||
int abiVersion();
|
||||
|
||||
String[] data();
|
||||
}
|
||||
@@ -0,0 +1,25 @@
|
||||
/*
|
||||
* Copyright 2010-2013 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.
|
||||
*/
|
||||
|
||||
package jet;
|
||||
|
||||
import java.lang.annotation.Retention;
|
||||
import java.lang.annotation.RetentionPolicy;
|
||||
|
||||
@Retention(RetentionPolicy.RUNTIME)
|
||||
public @interface KotlinPackageFragment {
|
||||
int abiVersion();
|
||||
}
|
||||
@@ -0,0 +1,25 @@
|
||||
/*
|
||||
* Copyright 2010-2013 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.
|
||||
*/
|
||||
|
||||
package jet;
|
||||
|
||||
import java.lang.annotation.Retention;
|
||||
import java.lang.annotation.RetentionPolicy;
|
||||
|
||||
@Retention(RetentionPolicy.RUNTIME)
|
||||
public @interface KotlinTraitImpl {
|
||||
int abiVersion();
|
||||
}
|
||||
@@ -0,0 +1,20 @@
|
||||
/*
|
||||
* Copyright 2010-2013 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.
|
||||
*/
|
||||
|
||||
package jet;
|
||||
|
||||
public class NoPatternMatchedException extends RuntimeException {
|
||||
}
|
||||
@@ -0,0 +1,24 @@
|
||||
/*
|
||||
* Copyright 2010-2013 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.
|
||||
*/
|
||||
|
||||
package jet;
|
||||
|
||||
public class TypeCastException extends ClassCastException {
|
||||
|
||||
public TypeCastException(String s) {
|
||||
super(s);
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,32 @@
|
||||
/*
|
||||
* Copyright 2010-2013 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.
|
||||
*/
|
||||
|
||||
package jet.modules;
|
||||
|
||||
import java.util.ArrayList;
|
||||
|
||||
public class AllModules {
|
||||
|
||||
public static final ThreadLocal<ArrayList<Module>> modules = new ThreadLocal<ArrayList<Module>>() {
|
||||
@Override
|
||||
protected ArrayList<Module> initialValue() {
|
||||
return new ArrayList<Module>();
|
||||
}
|
||||
};
|
||||
|
||||
private AllModules() {
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,38 @@
|
||||
/*
|
||||
* Copyright 2010-2013 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.
|
||||
*/
|
||||
|
||||
package jet.modules;
|
||||
|
||||
import jet.runtime.typeinfo.KotlinSignature;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
public interface Module {
|
||||
@KotlinSignature("fun getModuleName(): String")
|
||||
String getModuleName();
|
||||
|
||||
@KotlinSignature("fun getOutputDirectory(): String")
|
||||
String getOutputDirectory();
|
||||
|
||||
@KotlinSignature("fun getSourceFiles(): List<String>")
|
||||
List<String> getSourceFiles();
|
||||
|
||||
@KotlinSignature("fun getClasspathRoots(): List<String>")
|
||||
List<String> getClasspathRoots();
|
||||
|
||||
@KotlinSignature("fun getAnnotationsRoots(): List<String>")
|
||||
List<String> getAnnotationsRoots();
|
||||
}
|
||||
@@ -0,0 +1,249 @@
|
||||
/*
|
||||
* Copyright 2010-2013 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.
|
||||
*/
|
||||
|
||||
package jet.runtime;
|
||||
|
||||
import jet.*;
|
||||
|
||||
import java.util.Iterator;
|
||||
|
||||
public abstract class ArrayIterator<T> implements Iterator<T> {
|
||||
private final int size;
|
||||
protected int index;
|
||||
|
||||
protected ArrayIterator(int size) {
|
||||
this.size = size;
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean hasNext() {
|
||||
return index < size;
|
||||
}
|
||||
|
||||
private static class GenericIterator<T> extends ArrayIterator<T> {
|
||||
private final T[] array;
|
||||
|
||||
private GenericIterator(T[] array) {
|
||||
super(array.length);
|
||||
this.array = array;
|
||||
}
|
||||
|
||||
@Override
|
||||
public T next() {
|
||||
return array[index++];
|
||||
}
|
||||
|
||||
@Override
|
||||
public void remove() {
|
||||
throw new UnsupportedOperationException("Mutating method called on a Kotlin Iterator");
|
||||
}
|
||||
}
|
||||
|
||||
public static <T> Iterator<T> iterator(T[] array) {
|
||||
return new GenericIterator<T>(array);
|
||||
}
|
||||
|
||||
private static class ArrayByteIterator extends ByteIterator {
|
||||
private final byte[] array;
|
||||
private int index;
|
||||
|
||||
@Override
|
||||
public boolean hasNext() {
|
||||
return index < array.length;
|
||||
}
|
||||
|
||||
private ArrayByteIterator(byte[] array) {
|
||||
this.array = array;
|
||||
}
|
||||
|
||||
@Override
|
||||
public byte nextByte() {
|
||||
return array[index++];
|
||||
}
|
||||
}
|
||||
|
||||
public static ByteIterator iterator(byte[] array) {
|
||||
return new ArrayByteIterator(array);
|
||||
}
|
||||
|
||||
private static class ArrayShortIterator extends ShortIterator {
|
||||
private final short[] array;
|
||||
|
||||
private int index;
|
||||
|
||||
@Override
|
||||
public boolean hasNext() {
|
||||
return index < array.length;
|
||||
}
|
||||
|
||||
private ArrayShortIterator(short[] array) {
|
||||
this.array = array;
|
||||
}
|
||||
|
||||
@Override
|
||||
public short nextShort() {
|
||||
return array[index++];
|
||||
}
|
||||
}
|
||||
|
||||
public static ShortIterator iterator(short[] array) {
|
||||
return new ArrayShortIterator(array);
|
||||
}
|
||||
|
||||
private static class ArrayIntIterator extends IntIterator {
|
||||
private final int[] array;
|
||||
|
||||
private int index;
|
||||
|
||||
@Override
|
||||
public boolean hasNext() {
|
||||
return index < array.length;
|
||||
}
|
||||
|
||||
private ArrayIntIterator(int[] array) {
|
||||
this.array = array;
|
||||
}
|
||||
|
||||
@Override
|
||||
public int nextInt() {
|
||||
return array[index++];
|
||||
}
|
||||
}
|
||||
|
||||
public static IntIterator iterator(int[] array) {
|
||||
return new ArrayIntIterator(array);
|
||||
}
|
||||
|
||||
private static class ArrayLongIterator extends LongIterator {
|
||||
private final long[] array;
|
||||
|
||||
private int index;
|
||||
|
||||
@Override
|
||||
public boolean hasNext() {
|
||||
return index < array.length;
|
||||
}
|
||||
|
||||
private ArrayLongIterator(long[] array) {
|
||||
this.array = array;
|
||||
}
|
||||
|
||||
@Override
|
||||
public long nextLong() {
|
||||
return array[index++];
|
||||
}
|
||||
}
|
||||
|
||||
public static LongIterator iterator(long[] array) {
|
||||
return new ArrayLongIterator(array);
|
||||
}
|
||||
|
||||
private static class ArrayFloatIterator extends FloatIterator {
|
||||
private final float[] array;
|
||||
|
||||
private int index;
|
||||
|
||||
@Override
|
||||
public boolean hasNext() {
|
||||
return index < array.length;
|
||||
}
|
||||
|
||||
private ArrayFloatIterator(float[] array) {
|
||||
this.array = array;
|
||||
}
|
||||
|
||||
@Override
|
||||
public float nextFloat() {
|
||||
return array[index++];
|
||||
}
|
||||
}
|
||||
|
||||
public static FloatIterator iterator(float[] array) {
|
||||
return new ArrayFloatIterator(array);
|
||||
}
|
||||
|
||||
private static class ArrayDoubleIterator extends DoubleIterator {
|
||||
private final double[] array;
|
||||
|
||||
private int index;
|
||||
|
||||
@Override
|
||||
public boolean hasNext() {
|
||||
return index < array.length;
|
||||
}
|
||||
|
||||
private ArrayDoubleIterator(double[] array) {
|
||||
this.array = array;
|
||||
}
|
||||
|
||||
@Override
|
||||
public double nextDouble() {
|
||||
return array[index++];
|
||||
}
|
||||
}
|
||||
|
||||
public static DoubleIterator iterator(double[] array) {
|
||||
return new ArrayDoubleIterator(array);
|
||||
}
|
||||
|
||||
private static class ArrayCharacterIterator extends CharIterator {
|
||||
private final char[] array;
|
||||
|
||||
private int index;
|
||||
|
||||
@Override
|
||||
public boolean hasNext() {
|
||||
return index < array.length;
|
||||
}
|
||||
|
||||
private ArrayCharacterIterator(char[] array) {
|
||||
this.array = array;
|
||||
}
|
||||
|
||||
@Override
|
||||
public char nextChar() {
|
||||
return array[index++];
|
||||
}
|
||||
}
|
||||
|
||||
public static CharIterator iterator(char[] array) {
|
||||
return new ArrayCharacterIterator(array);
|
||||
}
|
||||
|
||||
private static class ArrayBooleanIterator extends BooleanIterator {
|
||||
private final boolean[] array;
|
||||
|
||||
private int index;
|
||||
|
||||
@Override
|
||||
public boolean hasNext() {
|
||||
return index < array.length;
|
||||
}
|
||||
|
||||
private ArrayBooleanIterator(boolean[] array) {
|
||||
this.array = array;
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean nextBoolean() {
|
||||
return array[index++];
|
||||
}
|
||||
}
|
||||
|
||||
public static BooleanIterator iterator(boolean[] array) {
|
||||
return new ArrayBooleanIterator(array);
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,63 @@
|
||||
package jet.runtime;
|
||||
|
||||
import java.util.Arrays;
|
||||
import java.util.Collection;
|
||||
import java.util.Iterator;
|
||||
|
||||
public class CollectionToArray {
|
||||
// Implementation copied from AbstractCollection
|
||||
|
||||
public static Object[] toArray(Collection<?> collection) {
|
||||
Object[] r = new Object[collection.size()];
|
||||
Iterator<?> it = collection.iterator();
|
||||
for (int i = 0; i < r.length; i++) {
|
||||
if (! it.hasNext()) // fewer elements than expected
|
||||
return Arrays.copyOf(r, i);
|
||||
r[i] = it.next();
|
||||
}
|
||||
return it.hasNext() ? finishToArray(r, it) : r;
|
||||
}
|
||||
|
||||
public static <T, E> T[] toArray(Collection<E> collection, T[] a) {
|
||||
// Estimate size of array; be prepared to see more or fewer elements
|
||||
int size = collection.size();
|
||||
T[] r = a.length >= size ? a :
|
||||
(T[])java.lang.reflect.Array
|
||||
.newInstance(a.getClass().getComponentType(), size);
|
||||
Iterator<E> it = collection.iterator();
|
||||
|
||||
for (int i = 0; i < r.length; i++) {
|
||||
if (! it.hasNext()) { // fewer elements than expected
|
||||
if (a != r)
|
||||
return Arrays.copyOf(r, i);
|
||||
r[i] = null; // null-terminate
|
||||
return r;
|
||||
}
|
||||
r[i] = (T)it.next();
|
||||
}
|
||||
return it.hasNext() ? finishToArray(r, it) : r;
|
||||
}
|
||||
|
||||
private static <T> T[] finishToArray(T[] r, Iterator<?> it) {
|
||||
int i = r.length;
|
||||
while (it.hasNext()) {
|
||||
int cap = r.length;
|
||||
if (i == cap) {
|
||||
int newCap = ((cap / 2) + 1) * 3;
|
||||
if (newCap <= cap) { // integer overflow
|
||||
if (cap == Integer.MAX_VALUE)
|
||||
throw new OutOfMemoryError
|
||||
("Required array size too large");
|
||||
newCap = Integer.MAX_VALUE;
|
||||
}
|
||||
r = Arrays.copyOf(r, newCap);
|
||||
}
|
||||
r[i++] = (T)it.next();
|
||||
}
|
||||
// trim if overallocated
|
||||
return (i == r.length) ? r : Arrays.copyOf(r, i);
|
||||
}
|
||||
|
||||
private CollectionToArray() {
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,28 @@
|
||||
/*
|
||||
* Copyright 2010-2013 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.
|
||||
*/
|
||||
|
||||
package jet.runtime;
|
||||
|
||||
import java.lang.annotation.ElementType;
|
||||
import java.lang.annotation.Retention;
|
||||
import java.lang.annotation.RetentionPolicy;
|
||||
import java.lang.annotation.Target;
|
||||
|
||||
@Retention(RetentionPolicy.RUNTIME)
|
||||
@Target(ElementType.METHOD)
|
||||
public @interface Intrinsic {
|
||||
String value();
|
||||
}
|
||||
@@ -0,0 +1,154 @@
|
||||
/*
|
||||
* Copyright 2010-2013 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.
|
||||
*/
|
||||
|
||||
package jet.runtime;
|
||||
|
||||
import jet.Function0;
|
||||
|
||||
import java.util.*;
|
||||
|
||||
@SuppressWarnings("unused")
|
||||
public class Intrinsics {
|
||||
private Intrinsics() {
|
||||
}
|
||||
|
||||
public static String stringPlus(String self, Object other) {
|
||||
return ((self == null) ? "null" : self) + ((other == null) ? "null" : other.toString());
|
||||
}
|
||||
|
||||
public static void throwNpe() {
|
||||
throw new JetNullPointerException();
|
||||
}
|
||||
|
||||
public static void checkReturnedValueIsNotNull(Object value, String className, String methodName) {
|
||||
if (value == null) {
|
||||
IllegalStateException exception =
|
||||
new IllegalStateException("Method specified as non-null returned null: " + className + "." + methodName);
|
||||
throw sanitizeStackTrace(exception);
|
||||
}
|
||||
}
|
||||
|
||||
public static void checkFieldIsNotNull(Object value, String className, String fieldName) {
|
||||
if (value == null) {
|
||||
IllegalStateException exception =
|
||||
new IllegalStateException("Field specified as non-null contains null: " + className + "." + fieldName);
|
||||
throw sanitizeStackTrace(exception);
|
||||
}
|
||||
}
|
||||
|
||||
public static void checkParameterIsNotNull(Object value, String paramName) {
|
||||
if (value == null) {
|
||||
StackTraceElement[] stackTraceElements = Thread.currentThread().getStackTrace();
|
||||
|
||||
// #0 is Thread.getStackTrace(), #1 is Intrinsics.checkParameterIsNotNull, #2 is our caller
|
||||
StackTraceElement caller = stackTraceElements[2];
|
||||
String className = caller.getClassName();
|
||||
String methodName = caller.getMethodName();
|
||||
|
||||
IllegalArgumentException exception =
|
||||
new IllegalArgumentException("Parameter specified as non-null contains null: " +
|
||||
"method " + className + "." + methodName +
|
||||
", parameter " + paramName);
|
||||
throw sanitizeStackTrace(exception);
|
||||
}
|
||||
}
|
||||
|
||||
public static <T> Class<T> getJavaClass(T self) {
|
||||
return (Class<T>) self.getClass();
|
||||
}
|
||||
|
||||
public static int compare(long thisVal, long anotherVal) {
|
||||
return (thisVal<anotherVal ? -1 : (thisVal==anotherVal ? 0 : 1));
|
||||
}
|
||||
|
||||
public static int compare(int thisVal, int anotherVal) {
|
||||
return (thisVal<anotherVal ? -1 : (thisVal==anotherVal ? 0 : 1));
|
||||
}
|
||||
|
||||
public static boolean areEqual(Object first, Object second) {
|
||||
return first == null ? second == null : first.equals(second);
|
||||
}
|
||||
|
||||
public static <R> R stupidSync(Object lock, Function0<R> block) {
|
||||
synchronized (lock) {
|
||||
return block.invoke();
|
||||
}
|
||||
}
|
||||
|
||||
private static final Set<String> METHOD_NAMES_TO_SKIP = new HashSet<String>(Arrays.asList(
|
||||
"throwNpe", "checkReturnedValueIsNotNull", "checkFieldIsNotNull", "checkParameterIsNotNull"
|
||||
));
|
||||
|
||||
private static <T extends Throwable> T sanitizeStackTrace(T throwable) {
|
||||
StackTraceElement[] stackTrace = throwable.getStackTrace();
|
||||
ArrayList<StackTraceElement> list = new ArrayList<StackTraceElement>();
|
||||
boolean skip = true;
|
||||
for(StackTraceElement ste : stackTrace) {
|
||||
if (!skip) {
|
||||
list.add(ste);
|
||||
}
|
||||
else {
|
||||
if ("jet.runtime.Intrinsics".equals(ste.getClassName())) {
|
||||
if (METHOD_NAMES_TO_SKIP.contains(ste.getMethodName())) {
|
||||
skip = false;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
throwable.setStackTrace(list.toArray(new StackTraceElement[list.size()]));
|
||||
return throwable;
|
||||
}
|
||||
|
||||
private static class JetNullPointerException extends NullPointerException {
|
||||
@Override
|
||||
public synchronized Throwable fillInStackTrace() {
|
||||
super.fillInStackTrace();
|
||||
return sanitizeStackTrace(this);
|
||||
}
|
||||
}
|
||||
|
||||
public static class SpreadBuilder extends ArrayList {
|
||||
public void addSpread(Object array) {
|
||||
if (array != null) {
|
||||
if (array instanceof Object[]) {
|
||||
Object[] arr = (Object[]) array;
|
||||
if (arr.length > 0) {
|
||||
ensureCapacity(size() + arr.length);
|
||||
for (int i = 0; i < arr.length; i++) {
|
||||
add(arr[i]);
|
||||
}
|
||||
}
|
||||
}
|
||||
else if (array instanceof Collection) {
|
||||
addAll((Collection) array);
|
||||
}
|
||||
else if (array instanceof Iterable) {
|
||||
for(Iterator iterator = ((Iterable) array).iterator(); iterator.hasNext(); ) {
|
||||
add(iterator.next());
|
||||
}
|
||||
}
|
||||
else if (array instanceof Iterator) {
|
||||
for(Iterator iterator = ((Iterator) array); iterator.hasNext(); ) {
|
||||
add(iterator.next());
|
||||
}
|
||||
}
|
||||
else {
|
||||
throw new UnsupportedOperationException("Don't know how to spread " + array.getClass());
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,225 @@
|
||||
/*
|
||||
* Copyright 2010-2013 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.
|
||||
*/
|
||||
|
||||
|
||||
package jet.runtime;
|
||||
|
||||
import jet.*;
|
||||
|
||||
/* This file is generated by org.jetbrains.jet.generators.runtime.GenerateRanges. DO NOT EDIT! */
|
||||
public class Ranges {
|
||||
public static ByteRange rangeTo(byte from, byte to) {
|
||||
return new ByteRange(from, to);
|
||||
}
|
||||
|
||||
public static ShortRange rangeTo(byte from, short to) {
|
||||
return new ShortRange(from, to);
|
||||
}
|
||||
|
||||
public static IntRange rangeTo(byte from, int to) {
|
||||
return new IntRange(from, to);
|
||||
}
|
||||
|
||||
public static LongRange rangeTo(byte from, long to) {
|
||||
return new LongRange(from, to);
|
||||
}
|
||||
|
||||
public static FloatRange rangeTo(byte from, float to) {
|
||||
return new FloatRange(from, to);
|
||||
}
|
||||
|
||||
public static DoubleRange rangeTo(byte from, double to) {
|
||||
return new DoubleRange(from, to);
|
||||
}
|
||||
|
||||
public static CharRange rangeTo(byte from, char to) {
|
||||
return new CharRange((char) from, to);
|
||||
}
|
||||
|
||||
public static ShortRange rangeTo(short from, byte to) {
|
||||
return new ShortRange(from, to);
|
||||
}
|
||||
|
||||
public static ShortRange rangeTo(short from, short to) {
|
||||
return new ShortRange(from, to);
|
||||
}
|
||||
|
||||
public static IntRange rangeTo(short from, int to) {
|
||||
return new IntRange(from, to);
|
||||
}
|
||||
|
||||
public static LongRange rangeTo(short from, long to) {
|
||||
return new LongRange(from, to);
|
||||
}
|
||||
|
||||
public static FloatRange rangeTo(short from, float to) {
|
||||
return new FloatRange(from, to);
|
||||
}
|
||||
|
||||
public static DoubleRange rangeTo(short from, double to) {
|
||||
return new DoubleRange(from, to);
|
||||
}
|
||||
|
||||
public static ShortRange rangeTo(short from, char to) {
|
||||
return new ShortRange(from, (short) to);
|
||||
}
|
||||
|
||||
public static IntRange rangeTo(int from, byte to) {
|
||||
return new IntRange(from, to);
|
||||
}
|
||||
|
||||
public static IntRange rangeTo(int from, short to) {
|
||||
return new IntRange(from, to);
|
||||
}
|
||||
|
||||
public static IntRange rangeTo(int from, int to) {
|
||||
return new IntRange(from, to);
|
||||
}
|
||||
|
||||
public static LongRange rangeTo(int from, long to) {
|
||||
return new LongRange(from, to);
|
||||
}
|
||||
|
||||
public static FloatRange rangeTo(int from, float to) {
|
||||
return new FloatRange(from, to);
|
||||
}
|
||||
|
||||
public static DoubleRange rangeTo(int from, double to) {
|
||||
return new DoubleRange(from, to);
|
||||
}
|
||||
|
||||
public static IntRange rangeTo(int from, char to) {
|
||||
return new IntRange(from, to);
|
||||
}
|
||||
|
||||
public static LongRange rangeTo(long from, byte to) {
|
||||
return new LongRange(from, to);
|
||||
}
|
||||
|
||||
public static LongRange rangeTo(long from, short to) {
|
||||
return new LongRange(from, to);
|
||||
}
|
||||
|
||||
public static LongRange rangeTo(long from, int to) {
|
||||
return new LongRange(from, to);
|
||||
}
|
||||
|
||||
public static LongRange rangeTo(long from, long to) {
|
||||
return new LongRange(from, to);
|
||||
}
|
||||
|
||||
public static FloatRange rangeTo(long from, float to) {
|
||||
return new FloatRange(from, to);
|
||||
}
|
||||
|
||||
public static DoubleRange rangeTo(long from, double to) {
|
||||
return new DoubleRange(from, to);
|
||||
}
|
||||
|
||||
public static LongRange rangeTo(long from, char to) {
|
||||
return new LongRange(from, to);
|
||||
}
|
||||
|
||||
public static FloatRange rangeTo(float from, byte to) {
|
||||
return new FloatRange(from, to);
|
||||
}
|
||||
|
||||
public static FloatRange rangeTo(float from, short to) {
|
||||
return new FloatRange(from, to);
|
||||
}
|
||||
|
||||
public static FloatRange rangeTo(float from, int to) {
|
||||
return new FloatRange(from, to);
|
||||
}
|
||||
|
||||
public static FloatRange rangeTo(float from, long to) {
|
||||
return new FloatRange(from, to);
|
||||
}
|
||||
|
||||
public static FloatRange rangeTo(float from, float to) {
|
||||
return new FloatRange(from, to);
|
||||
}
|
||||
|
||||
public static DoubleRange rangeTo(float from, double to) {
|
||||
return new DoubleRange(from, to);
|
||||
}
|
||||
|
||||
public static FloatRange rangeTo(float from, char to) {
|
||||
return new FloatRange(from, to);
|
||||
}
|
||||
|
||||
public static DoubleRange rangeTo(double from, byte to) {
|
||||
return new DoubleRange(from, to);
|
||||
}
|
||||
|
||||
public static DoubleRange rangeTo(double from, short to) {
|
||||
return new DoubleRange(from, to);
|
||||
}
|
||||
|
||||
public static DoubleRange rangeTo(double from, int to) {
|
||||
return new DoubleRange(from, to);
|
||||
}
|
||||
|
||||
public static DoubleRange rangeTo(double from, long to) {
|
||||
return new DoubleRange(from, to);
|
||||
}
|
||||
|
||||
public static DoubleRange rangeTo(double from, float to) {
|
||||
return new DoubleRange(from, to);
|
||||
}
|
||||
|
||||
public static DoubleRange rangeTo(double from, double to) {
|
||||
return new DoubleRange(from, to);
|
||||
}
|
||||
|
||||
public static DoubleRange rangeTo(double from, char to) {
|
||||
return new DoubleRange(from, to);
|
||||
}
|
||||
|
||||
public static CharRange rangeTo(char from, byte to) {
|
||||
return new CharRange(from, (char) to);
|
||||
}
|
||||
|
||||
public static ShortRange rangeTo(char from, short to) {
|
||||
return new ShortRange((short) from, to);
|
||||
}
|
||||
|
||||
public static IntRange rangeTo(char from, int to) {
|
||||
return new IntRange(from, to);
|
||||
}
|
||||
|
||||
public static LongRange rangeTo(char from, long to) {
|
||||
return new LongRange(from, to);
|
||||
}
|
||||
|
||||
public static FloatRange rangeTo(char from, float to) {
|
||||
return new FloatRange(from, to);
|
||||
}
|
||||
|
||||
public static DoubleRange rangeTo(char from, double to) {
|
||||
return new DoubleRange(from, to);
|
||||
}
|
||||
|
||||
public static CharRange rangeTo(char from, char to) {
|
||||
return new CharRange(from, to);
|
||||
}
|
||||
|
||||
public static IntRange arrayIndices(int length) {
|
||||
return new IntRange(0, length - 1);
|
||||
}
|
||||
|
||||
private Ranges() {}
|
||||
}
|
||||
@@ -0,0 +1,55 @@
|
||||
/*
|
||||
* Copyright 2010-2013 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.
|
||||
*/
|
||||
|
||||
package jet.runtime;
|
||||
|
||||
public final class SharedVar {
|
||||
public static final class Object<T> {
|
||||
public T ref;
|
||||
}
|
||||
|
||||
public static final class Byte {
|
||||
public byte ref;
|
||||
}
|
||||
|
||||
public static final class Short {
|
||||
public short ref;
|
||||
}
|
||||
|
||||
public static final class Int {
|
||||
public int ref;
|
||||
}
|
||||
|
||||
public static final class Long {
|
||||
public long ref;
|
||||
}
|
||||
|
||||
public static final class Float {
|
||||
public float ref;
|
||||
}
|
||||
|
||||
public static final class Double {
|
||||
public double ref;
|
||||
}
|
||||
|
||||
public static final class Char {
|
||||
public char ref;
|
||||
}
|
||||
|
||||
public static final class Boolean {
|
||||
public boolean ref;
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,35 @@
|
||||
/*
|
||||
* Copyright 2010-2013 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.
|
||||
*/
|
||||
|
||||
package jet.runtime.typeinfo;
|
||||
|
||||
import java.lang.annotation.ElementType;
|
||||
import java.lang.annotation.Retention;
|
||||
import java.lang.annotation.RetentionPolicy;
|
||||
import java.lang.annotation.Target;
|
||||
|
||||
@Target(ElementType.PARAMETER)
|
||||
@Retention(RetentionPolicy.RUNTIME)
|
||||
@Deprecated
|
||||
public @interface JetValueParameter {
|
||||
String name();
|
||||
|
||||
/**
|
||||
* This is a hack for Kara
|
||||
* @return <code>"?"</code> if the type of this parameter is nullable, an empty string otherwise
|
||||
*/
|
||||
String type() default "";
|
||||
}
|
||||
@@ -0,0 +1,25 @@
|
||||
/*
|
||||
* Copyright 2010-2013 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.
|
||||
*/
|
||||
|
||||
package jet.runtime.typeinfo;
|
||||
|
||||
import java.lang.annotation.ElementType;
|
||||
import java.lang.annotation.Target;
|
||||
|
||||
@Target({ElementType.METHOD, ElementType.TYPE, ElementType.CONSTRUCTOR, ElementType.FIELD})
|
||||
public @interface KotlinSignature {
|
||||
String value();
|
||||
}
|
||||
@@ -0,0 +1,29 @@
|
||||
/*
|
||||
* Copyright 2010-2013 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.
|
||||
*/
|
||||
|
||||
package org.jetbrains.annotations;
|
||||
|
||||
import java.lang.annotation.*;
|
||||
|
||||
/**
|
||||
* Annotate anything of type descendant from Iterable or Iterator with @Mutable if the corresponding collection/iterator
|
||||
* is allowed to be mutated
|
||||
*/
|
||||
@Documented
|
||||
@Retention(RetentionPolicy.CLASS)
|
||||
@Target({ElementType.METHOD, ElementType.FIELD, ElementType.PARAMETER, ElementType.LOCAL_VARIABLE})
|
||||
public @interface Mutable {
|
||||
}
|
||||
@@ -0,0 +1,32 @@
|
||||
/*
|
||||
* Copyright 2010-2013 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.
|
||||
*/
|
||||
|
||||
package org.jetbrains.annotations;
|
||||
|
||||
import java.lang.annotation.*;
|
||||
|
||||
/**
|
||||
* An element annotated with NotNull claims <code>null</code> value is <em>forbidden</em>
|
||||
* to return (for methods), pass to (parameters) and hold (local variables and fields).
|
||||
* Apart from documentation purposes this annotation is intended to be used by static analysis tools
|
||||
* to validate against probable runtime errors and element contract violations.
|
||||
*/
|
||||
@Documented
|
||||
@Retention(RetentionPolicy.CLASS)
|
||||
@Target({ElementType.METHOD, ElementType.FIELD, ElementType.PARAMETER, ElementType.LOCAL_VARIABLE})
|
||||
public @interface NotNull {
|
||||
String value() default "";
|
||||
}
|
||||
@@ -0,0 +1,32 @@
|
||||
/*
|
||||
* Copyright 2010-2013 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.
|
||||
*/
|
||||
|
||||
package org.jetbrains.annotations;
|
||||
|
||||
import java.lang.annotation.*;
|
||||
|
||||
/**
|
||||
* An element annotated with Nullable claims <code>null</code> value is perfectly <em>valid</em>
|
||||
* to return (for methods), pass to (parameters) and hold (local variables and fields).
|
||||
* Apart from documentation purposes this annotation is intended to be used by static analysis tools
|
||||
* to validate against probable runtime errors and element contract violations.
|
||||
*/
|
||||
@Documented
|
||||
@Retention(RetentionPolicy.CLASS)
|
||||
@Target({ElementType.METHOD, ElementType.FIELD, ElementType.PARAMETER, ElementType.LOCAL_VARIABLE})
|
||||
public @interface Nullable {
|
||||
String value() default "";
|
||||
}
|
||||
@@ -0,0 +1,29 @@
|
||||
/*
|
||||
* Copyright 2010-2013 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.
|
||||
*/
|
||||
|
||||
package org.jetbrains.annotations;
|
||||
|
||||
import java.lang.annotation.*;
|
||||
|
||||
/**
|
||||
* Annotate anything of type descendant from Iterable or Iterator with @ReadOnly if the underlying reference is not intended for mutation.
|
||||
* Note that such a reference is not guaranteed to be immutable. It may refer to an object mutated elsewhere.
|
||||
*/
|
||||
@Documented
|
||||
@Retention(RetentionPolicy.CLASS)
|
||||
@Target({ElementType.METHOD, ElementType.FIELD, ElementType.PARAMETER, ElementType.LOCAL_VARIABLE})
|
||||
public @interface ReadOnly {
|
||||
}
|
||||
Reference in New Issue
Block a user