Converter:
Classes are final by default in plugin mode
This commit is contained in:
@@ -19,17 +19,20 @@ package org.jetbrains.jet.j2k
|
||||
public class ConverterSettings(
|
||||
val forceNotNullTypes: Boolean,
|
||||
val forceLocalVariableImmutability: Boolean,
|
||||
val specifyLocalVariableTypeByDefault: Boolean
|
||||
val specifyLocalVariableTypeByDefault: Boolean,
|
||||
val openByDefault: Boolean
|
||||
) {}
|
||||
|
||||
public val PluginSettings: ConverterSettings = ConverterSettings(
|
||||
forceNotNullTypes = true,
|
||||
forceLocalVariableImmutability = true,
|
||||
specifyLocalVariableTypeByDefault = false
|
||||
specifyLocalVariableTypeByDefault = false,
|
||||
openByDefault = false
|
||||
)
|
||||
|
||||
public val TestSettings: ConverterSettings = ConverterSettings(
|
||||
forceNotNullTypes = false,
|
||||
forceLocalVariableImmutability = false,
|
||||
specifyLocalVariableTypeByDefault = true
|
||||
specifyLocalVariableTypeByDefault = true,
|
||||
openByDefault = true
|
||||
)
|
||||
|
||||
@@ -111,21 +111,20 @@ public open class Class(val converter: Converter,
|
||||
if (modifier != null) {
|
||||
modifierList.add(modifier)
|
||||
}
|
||||
if (needAbstractModifier()) {
|
||||
if (isAbstract()) {
|
||||
modifierList.add(Modifier.ABSTRACT)
|
||||
}
|
||||
|
||||
if (needOpenModifier()) {
|
||||
else if (needsOpenModifier()) {
|
||||
modifierList.add(Modifier.OPEN)
|
||||
}
|
||||
return modifierList.toKotlin()
|
||||
}
|
||||
|
||||
open fun needOpenModifier() = !modifiers.contains(Modifier.FINAL) && !modifiers.contains(Modifier.ABSTRACT)
|
||||
open fun isDefinitelyFinal() = modifiers.contains(Modifier.FINAL)
|
||||
|
||||
open fun needAbstractModifier() = isAbstract()
|
||||
open fun needsOpenModifier() = !isDefinitelyFinal() && converter.settings.openByDefault
|
||||
|
||||
open fun bodyToKotlin(): String {
|
||||
fun bodyToKotlin(): String {
|
||||
return " {\n" + getNonStatic(membersExceptConstructors()).toKotlin("\n") + "\n" + primaryConstructorBodyToKotlin() + "\n" + classObjectToKotlin() + "\n}"
|
||||
}
|
||||
|
||||
|
||||
@@ -19,7 +19,7 @@ package org.jetbrains.jet.j2k.ast
|
||||
import org.jetbrains.jet.j2k.Converter
|
||||
import org.jetbrains.jet.j2k.ast.types.Type
|
||||
|
||||
public open class Enum(converter: Converter,
|
||||
public class Enum(converter: Converter,
|
||||
name: Identifier,
|
||||
docComments: List<Node>,
|
||||
modifiers: Set<Modifier>,
|
||||
@@ -35,7 +35,7 @@ public open class Enum(converter: Converter,
|
||||
return if (s.equals("()")) "" else s
|
||||
}
|
||||
|
||||
override fun needOpenModifier() = false
|
||||
override fun isDefinitelyFinal() = true
|
||||
|
||||
public override fun toKotlin(): String {
|
||||
val primaryConstructorBody = primaryConstructorBodyToKotlin() ?: ""
|
||||
|
||||
@@ -19,7 +19,7 @@ package org.jetbrains.jet.j2k.ast
|
||||
import org.jetbrains.jet.j2k.Converter
|
||||
import org.jetbrains.jet.j2k.ast.types.Type
|
||||
|
||||
public open class Trait(converter: Converter,
|
||||
public class Trait(converter: Converter,
|
||||
name: Identifier,
|
||||
docComments: List<Node>,
|
||||
modifiers: Set<Modifier>,
|
||||
@@ -34,5 +34,5 @@ public open class Trait(converter: Converter,
|
||||
get() = "trait"
|
||||
|
||||
override fun primaryConstructorSignatureToKotlin() = ""
|
||||
override fun needOpenModifier() = false
|
||||
override fun needsOpenModifier() = false
|
||||
}
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
package test
|
||||
public open class Test(str : String) {
|
||||
public class Test(str : String) {
|
||||
var myStr : String = "String2"
|
||||
public open fun sout(str : String) {
|
||||
System.out.println(str)
|
||||
|
||||
@@ -1,13 +1,13 @@
|
||||
package test
|
||||
open class Foo() {
|
||||
class Foo() {
|
||||
open fun execute() {
|
||||
}
|
||||
}
|
||||
open class Bar() {
|
||||
class Bar() {
|
||||
var fooNotNull : Foo = Foo()
|
||||
var fooNullable : Foo = null
|
||||
}
|
||||
open class Test() {
|
||||
class Test() {
|
||||
public open fun test(barNotNull : Bar, barNullable : Bar) {
|
||||
barNotNull.fooNotNull.execute()
|
||||
barNotNull.fooNullable.execute()
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
open class Test() {
|
||||
class Test() {
|
||||
var str : String = 0
|
||||
{
|
||||
str = "Ola"
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
open class Test() {
|
||||
class Test() {
|
||||
var str : String = 0
|
||||
class object {
|
||||
{
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
import java.util.BitSet
|
||||
open class Foo() {
|
||||
class Foo() {
|
||||
open fun foo(o : BitSet) {
|
||||
val o2 = o
|
||||
val foo = 0
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
import java.util.ArrayList
|
||||
open class Boxing() {
|
||||
class Boxing() {
|
||||
open fun test() {
|
||||
val i = 0
|
||||
val n = 0.0.toFloat()
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
package demo
|
||||
open class Test() {
|
||||
class Test() {
|
||||
open fun test() {
|
||||
val i = Integer.valueOf(100)
|
||||
val s = 3
|
||||
|
||||
@@ -1,9 +1,9 @@
|
||||
open class Library() {
|
||||
class Library() {
|
||||
class object {
|
||||
val ourOut : java.io.PrintStream = 0
|
||||
}
|
||||
}
|
||||
open class User() {
|
||||
class User() {
|
||||
open fun main() {
|
||||
Library.ourOut.print()
|
||||
}
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
open class Library() {
|
||||
class Library() {
|
||||
class object {
|
||||
open fun call() {
|
||||
}
|
||||
@@ -7,7 +7,7 @@ return ""
|
||||
}
|
||||
}
|
||||
}
|
||||
open class User() {
|
||||
class User() {
|
||||
open fun main() {
|
||||
Library.call()
|
||||
Library.getString().isEmpty()
|
||||
|
||||
@@ -1,11 +1,11 @@
|
||||
open class Library() {
|
||||
class Library() {
|
||||
open fun call() {
|
||||
}
|
||||
open fun getString() : String {
|
||||
return ""
|
||||
}
|
||||
}
|
||||
open class User() {
|
||||
class User() {
|
||||
open fun main() {
|
||||
val lib = Library()
|
||||
lib.call()
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
open class Library() {
|
||||
class Library() {
|
||||
public val myString : String = 0
|
||||
}
|
||||
open class User() {
|
||||
class User() {
|
||||
open fun main() {
|
||||
Library.myString.isEmpty()
|
||||
}
|
||||
|
||||
@@ -1,12 +1,12 @@
|
||||
package test
|
||||
public open class Short() {
|
||||
public class Short() {
|
||||
class object {
|
||||
public open fun valueOf(value : String) : Short {
|
||||
return Short()
|
||||
}
|
||||
}
|
||||
}
|
||||
open class Test() {
|
||||
class Test() {
|
||||
class object {
|
||||
public open fun test() {
|
||||
test.Short.valueOf("1")
|
||||
|
||||
@@ -1,2 +1,2 @@
|
||||
open class Test() {
|
||||
class Test() {
|
||||
}
|
||||
@@ -1,6 +1,6 @@
|
||||
class S() {
|
||||
class object {
|
||||
open class Inner() {
|
||||
class Inner() {
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -1,2 +1,2 @@
|
||||
open class Test() {
|
||||
class Test() {
|
||||
}
|
||||
@@ -1,6 +1,6 @@
|
||||
package demo
|
||||
import java.util.HashMap
|
||||
open class Test() {
|
||||
class Test() {
|
||||
class object {
|
||||
open fun init() : Test {
|
||||
val __ = Test()
|
||||
@@ -12,7 +12,7 @@ return __
|
||||
}
|
||||
}
|
||||
}
|
||||
open class User() {
|
||||
class User() {
|
||||
open fun main() {
|
||||
val m = HashMap(1)
|
||||
val m2 = HashMap(10)
|
||||
|
||||
@@ -1,2 +1,2 @@
|
||||
private open class Test() {
|
||||
private class Test() {
|
||||
}
|
||||
@@ -1,4 +1,4 @@
|
||||
public open class MyClass() {
|
||||
public class MyClass() {
|
||||
private fun init(arg1 : Int, arg2 : Int, arg3 : Int) {
|
||||
}
|
||||
}
|
||||
@@ -1,2 +1,2 @@
|
||||
protected open class Test() {
|
||||
protected class Test() {
|
||||
}
|
||||
@@ -1,2 +1,2 @@
|
||||
public open class Test() {
|
||||
public class Test() {
|
||||
}
|
||||
@@ -1,4 +1,4 @@
|
||||
open class C(arg1 : Int, arg2 : Int, arg3 : Int) {
|
||||
class C(arg1 : Int, arg2 : Int, arg3 : Int) {
|
||||
class object {
|
||||
open fun init(arg1 : Int, arg2 : Int) : C {
|
||||
val __ = C(arg1, arg2, 0)
|
||||
@@ -10,7 +10,7 @@ return __
|
||||
}
|
||||
}
|
||||
}
|
||||
public open class User() {
|
||||
public class User() {
|
||||
class object {
|
||||
public open fun main() {
|
||||
val c1 = C(100, 100, 100)
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
open class C(arg1 : Int) {
|
||||
class C(arg1 : Int) {
|
||||
val myArg1 : Int
|
||||
var myArg2 : Int = 0
|
||||
var myArg3 : Int = 0
|
||||
@@ -22,7 +22,7 @@ return __
|
||||
}
|
||||
}
|
||||
}
|
||||
public open class User() {
|
||||
public class User() {
|
||||
class object {
|
||||
public open fun main() {
|
||||
val c1 = C.init(100, 100, 100)
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
package org.test.customer
|
||||
open class Customer(first : String, last : String) {
|
||||
class Customer(first : String, last : String) {
|
||||
public val _firstName : String
|
||||
public val _lastName : String
|
||||
public open fun getFirstName() : String {
|
||||
@@ -19,7 +19,7 @@ _lastName = last
|
||||
doSmthAfter()
|
||||
}
|
||||
}
|
||||
open class CustomerBuilder() {
|
||||
class CustomerBuilder() {
|
||||
public var _firstName : String = "Homer"
|
||||
public var _lastName : String = "Simpson"
|
||||
public open fun WithFirstName(firstName : String) : CustomerBuilder {
|
||||
@@ -34,7 +34,7 @@ public open fun Build() : Customer {
|
||||
return Customer(_firstName, _lastName)
|
||||
}
|
||||
}
|
||||
public open class User() {
|
||||
public class User() {
|
||||
class object {
|
||||
public open fun main() {
|
||||
val customer = CustomerBuilder().WithFirstName("Homer").WithLastName("Simpson").Build()
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
public open class Identifier<T>(_myName : T, _myHasDollar : Boolean) {
|
||||
public class Identifier<T>(_myName : T, _myHasDollar : Boolean) {
|
||||
private val myName : T
|
||||
private var myHasDollar : Boolean = false
|
||||
private var myNullable : Boolean = true
|
||||
@@ -26,7 +26,7 @@ return __
|
||||
}
|
||||
}
|
||||
}
|
||||
public open class User() {
|
||||
public class User() {
|
||||
class object {
|
||||
public open fun main() {
|
||||
val i1 = Identifier.init<String>("name", false, true)
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
public open class Identifier(_myName : String, _myHasDollar : Boolean) {
|
||||
public class Identifier(_myName : String, _myHasDollar : Boolean) {
|
||||
private val myName : String
|
||||
private var myHasDollar : Boolean = false
|
||||
private var myNullable : Boolean = true
|
||||
@@ -26,7 +26,7 @@ return __
|
||||
}
|
||||
}
|
||||
}
|
||||
public open class User() {
|
||||
public class User() {
|
||||
class object {
|
||||
public open fun main() {
|
||||
val i1 = Identifier.init("name", false, true)
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
public open class Test(_myName : String, _a : Boolean, _b : Double, _c : Float, _d : Long, _e : Int, _f : Short, _g : Char) {
|
||||
public class Test(_myName : String, _a : Boolean, _b : Double, _c : Float, _d : Long, _e : Int, _f : Short, _g : Char) {
|
||||
private val myName : String
|
||||
private var a : Boolean = false
|
||||
private var b : Double = 0.toDouble()
|
||||
@@ -31,7 +31,7 @@ return ""
|
||||
}
|
||||
}
|
||||
}
|
||||
public open class User() {
|
||||
public class User() {
|
||||
class object {
|
||||
public open fun main() {
|
||||
val t = Test.init("name")
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
open class Base() {
|
||||
class Base() {
|
||||
private var myFirst : String = 0
|
||||
}
|
||||
open class Child() : Base() {
|
||||
class Child() : Base() {
|
||||
private var mySecond : String = 0
|
||||
}
|
||||
@@ -1,3 +1,3 @@
|
||||
open class C() {
|
||||
class C() {
|
||||
var f : Foo = 0
|
||||
}
|
||||
@@ -1,3 +1,3 @@
|
||||
open class C() {
|
||||
class C() {
|
||||
private var f : Foo = 0
|
||||
}
|
||||
@@ -1,3 +1,3 @@
|
||||
open class C() {
|
||||
class C() {
|
||||
protected var f : Foo = 0
|
||||
}
|
||||
@@ -1,3 +1,3 @@
|
||||
open class C() {
|
||||
class C() {
|
||||
public var f : Foo = 0
|
||||
}
|
||||
@@ -1,3 +1,3 @@
|
||||
open class C() {
|
||||
class C() {
|
||||
val f : Foo = Foo(1, 2)
|
||||
}
|
||||
@@ -1,3 +1,3 @@
|
||||
open class C() {
|
||||
class C() {
|
||||
var f : Foo = Foo(1, 2)
|
||||
}
|
||||
@@ -1,3 +1,3 @@
|
||||
open class C() {
|
||||
class C() {
|
||||
var f : Foo = 0
|
||||
}
|
||||
@@ -1,5 +1,5 @@
|
||||
package test
|
||||
open class Test() : Base() {
|
||||
class Test() : Base() {
|
||||
public override fun hashCode() : Int {
|
||||
return super.hashCode()
|
||||
}
|
||||
@@ -16,7 +16,7 @@ protected override fun finalize() {
|
||||
super.finalize()
|
||||
}
|
||||
}
|
||||
open class Base() {
|
||||
class Base() {
|
||||
public open fun hashCode() : Int {
|
||||
return System.identityHashCode(this)
|
||||
}
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
open class A() {
|
||||
class A() {
|
||||
open fun a() {
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1,12 +1,12 @@
|
||||
open class A() {
|
||||
class A() {
|
||||
open fun foo() {
|
||||
}
|
||||
}
|
||||
open class B() : A() {
|
||||
class B() : A() {
|
||||
override fun foo() {
|
||||
}
|
||||
}
|
||||
open class C() : B() {
|
||||
class C() : B() {
|
||||
override fun foo() {
|
||||
}
|
||||
}
|
||||
@@ -1,5 +1,5 @@
|
||||
package test
|
||||
open class Test() {
|
||||
class Test() {
|
||||
public open fun hashCode() : Int {
|
||||
return System.identityHashCode(this)
|
||||
}
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
package demo
|
||||
open class Test() {
|
||||
class Test() {
|
||||
open fun test(vararg var args : Any) {
|
||||
args = array<Int>(1, 2, 3)
|
||||
}
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
package demo
|
||||
open class Test() {
|
||||
class Test() {
|
||||
open fun test(var i : Int) : Int {
|
||||
i = 10
|
||||
return i + 20
|
||||
|
||||
@@ -1,8 +1,8 @@
|
||||
open class `$$$$$`() {
|
||||
class `$$$$$`() {
|
||||
}
|
||||
open class `$`() {
|
||||
class `$`() {
|
||||
}
|
||||
open class `$$`(`$$$$` : `$$$$$`) : `$`() {
|
||||
class `$$`(`$$$$` : `$$$$$`) : `$`() {
|
||||
val `$$$` : `$$$$$`
|
||||
public open fun `$$$$$$`() : `$$$$$` {
|
||||
return `$$$`
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
package test
|
||||
import `as`.`type`.`val`.`var`.`fun`.`is`.`in`.`object`.`when`.`trait`.`This`
|
||||
open class Test() {
|
||||
class Test() {
|
||||
}
|
||||
@@ -1,4 +1,4 @@
|
||||
package org.jetbrains.jet.j2k
|
||||
import org.jetbrains.annotations.*
|
||||
public open class Converter() {
|
||||
public class Converter() {
|
||||
}
|
||||
@@ -1,3 +1,3 @@
|
||||
package org.jetbrains.jet.j2k
|
||||
public open class Converter() {
|
||||
public class Converter() {
|
||||
}
|
||||
@@ -1,6 +1,6 @@
|
||||
open class Base<T>(name : T) {
|
||||
class Base<T>(name : T) {
|
||||
}
|
||||
open class One<T, K>(name : T, second : K) : Base<T>(name) {
|
||||
class One<T, K>(name : T, second : K) : Base<T>(name) {
|
||||
private var mySecond : K = 0
|
||||
{
|
||||
mySecond = second
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
open class Base(name : String) {
|
||||
class Base(name : String) {
|
||||
}
|
||||
open class One(name : String, second : String) : Base(name) {
|
||||
class One(name : String, second : String) : Base(name) {
|
||||
}
|
||||
@@ -1,4 +1,4 @@
|
||||
open class Base() {
|
||||
class Base() {
|
||||
}
|
||||
open class One() : Base() {
|
||||
class One() : Base() {
|
||||
}
|
||||
+2
-2
@@ -1,6 +1,6 @@
|
||||
open class Base(name : String) {
|
||||
class Base(name : String) {
|
||||
}
|
||||
open class One(name : String, second : String) : Base(name) {
|
||||
class One(name : String, second : String) : Base(name) {
|
||||
private var mySecond : String = 0
|
||||
{
|
||||
mySecond = second
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
open class Test() {
|
||||
class Test() {
|
||||
class object {
|
||||
public open fun foo(args : Array<String>) : Int {
|
||||
return args.size
|
||||
|
||||
@@ -2,7 +2,7 @@
|
||||
/*
|
||||
This is a block comment
|
||||
*/
|
||||
open class C() {
|
||||
class C() {
|
||||
// This is a class comment
|
||||
/**
|
||||
* This is a field doc comment.
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
package demo
|
||||
open class C(i : Int) {
|
||||
class C(i : Int) {
|
||||
private val i : Int
|
||||
{
|
||||
this.i = i
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
import java.util.HashMap
|
||||
open class G<T : String>(t : T) {
|
||||
class G<T : String>(t : T) {
|
||||
}
|
||||
public open class Java() {
|
||||
public class Java() {
|
||||
open fun test() {
|
||||
val m = HashMap()
|
||||
m.put(1, 1)
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
package demo
|
||||
open class Test() {
|
||||
class Test() {
|
||||
class object {
|
||||
open fun subListRangeCheck(fromIndex : Int, toIndex : Int, size : Int) {
|
||||
if (fromIndex < 0)
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
package demo
|
||||
open class Test() {
|
||||
class Test() {
|
||||
open fun putInt(i : Int) {
|
||||
}
|
||||
open fun test() {
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
package demo
|
||||
open class Test() {
|
||||
class Test() {
|
||||
open fun putInt(i : Int) {
|
||||
}
|
||||
open fun test() {
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
package demo
|
||||
open class Test() {
|
||||
class Test() {
|
||||
open fun putInt(i : Int) {
|
||||
}
|
||||
open fun test() {
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
public open class Identifier<T>(_myName : T, _myHasDollar : Boolean) {
|
||||
public class Identifier<T>(_myName : T, _myHasDollar : Boolean) {
|
||||
private val myName : T
|
||||
private var myHasDollar : Boolean = false
|
||||
private var myNullable : Boolean = true
|
||||
@@ -26,7 +26,7 @@ return __
|
||||
}
|
||||
}
|
||||
}
|
||||
public open class User() {
|
||||
public class User() {
|
||||
class object {
|
||||
public open fun main(args : Array<String>) {
|
||||
val i1 = Identifier.init<String>("name", false, true)
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
package test
|
||||
open class Base() {
|
||||
class Base() {
|
||||
public open fun hashCode() : Int {
|
||||
return System.identityHashCode(this)
|
||||
}
|
||||
@@ -10,7 +10,7 @@ public open fun toString() : String {
|
||||
return getJavaClass<Base>.getName() + '@' + Integer.toHexString(hashCode())
|
||||
}
|
||||
}
|
||||
open class Child() : Base() {
|
||||
class Child() : Base() {
|
||||
public override fun hashCode() : Int {
|
||||
return super.hashCode()
|
||||
}
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
package demo
|
||||
open class Test(i : Int) {
|
||||
class Test(i : Int) {
|
||||
open fun test() {
|
||||
val i = 10
|
||||
Test(i)
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
package demo
|
||||
open class Test(i : Int) {
|
||||
class Test(i : Int) {
|
||||
open fun test() {
|
||||
val b = 10
|
||||
Test(b.toInt())
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
package demo
|
||||
open class Test() {
|
||||
class Test() {
|
||||
open fun getInteger(i : Int) : Int {
|
||||
return i
|
||||
}
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
open class Test() {
|
||||
class Test() {
|
||||
open fun getInt() : Int {
|
||||
val b = 10
|
||||
return b.toInt()
|
||||
|
||||
@@ -1,15 +1,15 @@
|
||||
package demo
|
||||
open class Container() {
|
||||
class Container() {
|
||||
var myString : String = "1"
|
||||
}
|
||||
open class One() {
|
||||
class One() {
|
||||
class object {
|
||||
var myContainer : Container = Container()
|
||||
}
|
||||
}
|
||||
open class StringContainer(s : String) {
|
||||
class StringContainer(s : String) {
|
||||
}
|
||||
open class Test() {
|
||||
class Test() {
|
||||
open fun putString(s : String) {
|
||||
}
|
||||
open fun test() {
|
||||
|
||||
@@ -1,15 +1,15 @@
|
||||
package demo
|
||||
open class Container() {
|
||||
class Container() {
|
||||
var myInt : Int = 1
|
||||
}
|
||||
open class One() {
|
||||
class One() {
|
||||
class object {
|
||||
var myContainer : Container = Container()
|
||||
}
|
||||
}
|
||||
open class IntContainer(i : Int) {
|
||||
class IntContainer(i : Int) {
|
||||
}
|
||||
open class Test() {
|
||||
class Test() {
|
||||
open fun putInt(i : Int) {
|
||||
}
|
||||
open fun test() {
|
||||
|
||||
@@ -1,12 +1,12 @@
|
||||
package demo
|
||||
open class Container() {
|
||||
class Container() {
|
||||
var myInt : Int = 1
|
||||
}
|
||||
open class One() {
|
||||
class One() {
|
||||
class object {
|
||||
var myContainer : Container = Container()
|
||||
}
|
||||
}
|
||||
open class Test() {
|
||||
class Test() {
|
||||
var b : Byte = One.myContainer.myInt.toByte()
|
||||
}
|
||||
@@ -1,4 +1,4 @@
|
||||
open class Test() {
|
||||
class Test() {
|
||||
class object {
|
||||
public open fun toFileSystemSafeName(name : String) : String {
|
||||
val size = name.length()
|
||||
|
||||
@@ -1,13 +1,13 @@
|
||||
package demo
|
||||
open class Container() {
|
||||
class Container() {
|
||||
var myInt : Int = 1
|
||||
}
|
||||
open class One() {
|
||||
class One() {
|
||||
class object {
|
||||
var myContainer : Container = Container()
|
||||
}
|
||||
}
|
||||
open class Test() {
|
||||
class Test() {
|
||||
open fun test() {
|
||||
val b = One.myContainer.myInt.toByte()
|
||||
}
|
||||
|
||||
@@ -3,7 +3,7 @@ import java.io.File
|
||||
/**
|
||||
* User: ignatov
|
||||
*/
|
||||
public open class Test() {
|
||||
public class Test() {
|
||||
class object {
|
||||
public open fun isDir(parent : File) : Boolean {
|
||||
if (parent == null || !parent.exists())
|
||||
|
||||
@@ -1,13 +1,13 @@
|
||||
package demo
|
||||
open class Container() {
|
||||
class Container() {
|
||||
var myBoolean : Boolean = true
|
||||
}
|
||||
open class One() {
|
||||
class One() {
|
||||
class object {
|
||||
var myContainer : Container = Container()
|
||||
}
|
||||
}
|
||||
open class Test() {
|
||||
class Test() {
|
||||
open fun test() {
|
||||
if (One.myContainer.myBoolean)
|
||||
System.out.println("Ok")
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
open class Test() {
|
||||
class Test() {
|
||||
open fun test() {
|
||||
val res = true
|
||||
res = res and false
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
package com.voltvoodoo.saplo4j.model
|
||||
import java.io.Serializable
|
||||
public open class Language(code : String) : Serializable {
|
||||
public class Language(code : String) : Serializable {
|
||||
protected var code : String = 0
|
||||
public override fun toString() : String {
|
||||
return this.code
|
||||
@@ -9,14 +9,14 @@ return this.code
|
||||
this.code = code
|
||||
}
|
||||
}
|
||||
open class Base() {
|
||||
class Base() {
|
||||
open fun test() {
|
||||
}
|
||||
open fun toString() : String {
|
||||
return "BASE"
|
||||
}
|
||||
}
|
||||
open class Child() : Base() {
|
||||
class Child() : Base() {
|
||||
override fun test() {
|
||||
}
|
||||
override fun toString() : String {
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
package com.voltvoodoo.saplo4j.model
|
||||
import java.io.Serializable
|
||||
public open class Language(code : String) : Serializable {
|
||||
public class Language(code : String) : Serializable {
|
||||
protected var code : String = 0
|
||||
public open fun equals(other : Language) : Boolean {
|
||||
return other.toString().equals(this.toString())
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
package demo
|
||||
open class Test() {
|
||||
class Test() {
|
||||
open fun test() : String {
|
||||
val s1 = ""
|
||||
val s2 = ""
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
package demo
|
||||
open class Program() {
|
||||
class Program() {
|
||||
class object {
|
||||
public open fun main(args : Array<String>) {
|
||||
System.out.println("Halo!")
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
open class Test() {
|
||||
class Test() {
|
||||
class object {
|
||||
public open fun getInt(i : Int) : Int {
|
||||
when (i) {
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
package demo
|
||||
open class Test() {
|
||||
class Test() {
|
||||
open fun test() {
|
||||
for (i in 0..10 - 1) {
|
||||
System.out.println(i)
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
package demo
|
||||
open class C(a : Int) {
|
||||
class C(a : Int) {
|
||||
var abc : Int = 0
|
||||
{
|
||||
abc = a * 2
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
package demo
|
||||
open class Test() : java.lang.Iterable<String> {
|
||||
class Test() : java.lang.Iterable<String> {
|
||||
public override fun iterator() : java.util.Iterator<String> {
|
||||
return null
|
||||
}
|
||||
@@ -8,7 +8,7 @@ val j = i
|
||||
return j
|
||||
}
|
||||
}
|
||||
open class FullTest() : java.lang.Iterable<String> {
|
||||
class FullTest() : java.lang.Iterable<String> {
|
||||
public override fun iterator() : java.util.Iterator<String> {
|
||||
return null
|
||||
}
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
import java.util.*
|
||||
public open class ForEach() {
|
||||
public class ForEach() {
|
||||
public open fun test() {
|
||||
val xs = ArrayList<Any>()
|
||||
val ys = LinkedList<Any>()
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
import java.util.*
|
||||
public open class Lists() {
|
||||
public class Lists() {
|
||||
public open fun test() {
|
||||
val xs = ArrayList<Any>()
|
||||
val ys = LinkedList<Any>()
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
open class Test() {
|
||||
class Test() {
|
||||
open fun test() {
|
||||
val c1 = 'c'
|
||||
val c2 = 'C'
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
package demo
|
||||
open class Test() {
|
||||
class Test() {
|
||||
open fun test() {
|
||||
val name = "$$$$"
|
||||
name = name.replaceAll("\\$[0-9]+", "\\$")
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
open class Test() {
|
||||
class Test() {
|
||||
open fun test() {
|
||||
val l1 = 10
|
||||
val d1 = 10.0
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
open class Test() {
|
||||
class Test() {
|
||||
open fun test() {
|
||||
val i1 = 33
|
||||
val i2 = 51
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
open class Test() {
|
||||
class Test() {
|
||||
open fun test() {
|
||||
val i1 = 37
|
||||
val i2 = 26
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
open class Test() {
|
||||
class Test() {
|
||||
open fun test() {
|
||||
val t1 = true
|
||||
val t2 = true
|
||||
|
||||
@@ -1,9 +1,9 @@
|
||||
package demo
|
||||
open class Map() {
|
||||
class Map() {
|
||||
open fun put<K, V>(k : K, v : V) {
|
||||
}
|
||||
}
|
||||
open class U() {
|
||||
class U() {
|
||||
open fun test() {
|
||||
val m = Map()
|
||||
m.put<String, Int>("10", 10)
|
||||
|
||||
@@ -1,3 +1,3 @@
|
||||
package test
|
||||
open class C() {
|
||||
class C() {
|
||||
}
|
||||
@@ -1,5 +1,5 @@
|
||||
package test
|
||||
open class User() {
|
||||
class User() {
|
||||
open fun main() {
|
||||
val list = java.util.LinkedList()
|
||||
}
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
package test
|
||||
open class User() {
|
||||
class User() {
|
||||
open fun main() {
|
||||
val list = java.util.LinkedList()
|
||||
}
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
import java.util.LinkedList
|
||||
open class User() {
|
||||
class User() {
|
||||
open fun main() {
|
||||
val list = LinkedList<String>()
|
||||
}
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
package org.test
|
||||
open class Library() {
|
||||
class Library() {
|
||||
}
|
||||
open class User() {
|
||||
class User() {
|
||||
open fun main() {
|
||||
val lib = Library()
|
||||
}
|
||||
|
||||
@@ -1,9 +1,9 @@
|
||||
package org.test
|
||||
open class OuterClass() {
|
||||
open class InnerClass() {
|
||||
class OuterClass() {
|
||||
class InnerClass() {
|
||||
}
|
||||
}
|
||||
open class User() {
|
||||
class User() {
|
||||
open fun main() {
|
||||
val outerObject = OuterClass()
|
||||
val innerObject = outerObject.InnerClass()
|
||||
|
||||
@@ -1,8 +1,8 @@
|
||||
package org.test
|
||||
import java.util.LinkedList
|
||||
open class Member() {
|
||||
class Member() {
|
||||
}
|
||||
open class User() {
|
||||
class User() {
|
||||
open fun main() {
|
||||
val members = LinkedList<Member>()
|
||||
members.add(Member())
|
||||
|
||||
@@ -1,11 +1,11 @@
|
||||
package demo
|
||||
open class Foo() {
|
||||
class Foo() {
|
||||
class object {
|
||||
open class Bar() {
|
||||
class Bar() {
|
||||
}
|
||||
}
|
||||
}
|
||||
open class User() {
|
||||
class User() {
|
||||
open fun main() {
|
||||
val boo = Foo.Bar()
|
||||
}
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
package demo
|
||||
open class WindowAdapter() {
|
||||
class WindowAdapter() {
|
||||
public open fun windowClosing() {
|
||||
}
|
||||
}
|
||||
|
||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user