read java bean properties as kotlin properties

This commit is contained in:
Stepan Koltsov
2012-02-21 23:15:36 +04:00
parent cc8d263f9e
commit f83c5e0d83
18 changed files with 137 additions and 9 deletions

View File

@@ -0,0 +1,6 @@
package test;
class DifferentGetterAndSetter {
void setSomething(String color) { }
int getSomething() { return 17; }
}

View File

@@ -0,0 +1,6 @@
package test
open class DifferentGetterAndSetter() {
open fun setSomething(p0: String?): Unit { }
open fun getSomething() = 17
}

View File

@@ -0,0 +1,7 @@
namespace test
open class test.DifferentGetterAndSetter : jet.Any {
final /*constructor*/ fun <init>(): test.DifferentGetterAndSetter
open fun getSomething(): jet.Int
open fun setSomething(/*0*/ p0: jet.String?): jet.Tuple0
}

View File

@@ -0,0 +1,5 @@
package test;
class JavaBeanVal {
String getColor() { return ""; }
}

View File

@@ -0,0 +1,6 @@
package test
open class JavaBeanVal() {
open fun getColor(): String? = ""
val color: String? = ""
}

View File

@@ -0,0 +1,7 @@
namespace test
open class test.JavaBeanVal : jet.Any {
final /*constructor*/ fun <init>(): test.JavaBeanVal
open fun getColor(): jet.String?
val color: jet.String?
}

View File

@@ -0,0 +1,6 @@
package test;
class JavaBeanVal {
String getColor() { return ""; }
void setColor(String string) { }
}

View File

@@ -0,0 +1,7 @@
package test
open class JavaBeanVal() {
open fun getColor(): String? = ""
open fun setColor(p0: String?): Unit { }
var color: String? = ""
}

View File

@@ -0,0 +1,8 @@
namespace test
open class test.JavaBeanVal : jet.Any {
final /*constructor*/ fun <init>(): test.JavaBeanVal
open fun getColor(): jet.String?
open fun setColor(/*0*/ p0: jet.String?): jet.Tuple0
var color: jet.String?
}

View File

@@ -0,0 +1,8 @@
package test;
import java.util.ArrayList;
class JavaBeanVarOfGenericType<P> {
ArrayList<P> getCharacters() { return null; }
void setCharacters(ArrayList<P> characters) { }
}

View File

@@ -0,0 +1,9 @@
package test
import java.util.ArrayList
open class JavaBeanVarOfGenericType<erased P> {
open fun getCharacters(): ArrayList<P>? = null
open fun setCharacters(p0: ArrayList<P>?) { }
var characters: ArrayList<P>? = null
}

View File

@@ -0,0 +1,8 @@
namespace test
open class test.JavaBeanVarOfGenericType</*0*/ P : jet.Any?> : jet.Any {
final /*constructor*/ fun </*0*/ P : jet.Any?><init>(): test.JavaBeanVarOfGenericType</*0*/ P : jet.Any?>
open fun getCharacters(): java.util.ArrayList</*0*/ P : jet.Any?>?
open fun setCharacters(/*0*/ p0: java.util.ArrayList<P>?): jet.Tuple0
var characters: java.util.ArrayList</*0*/ P : jet.Any?>?
}

View File

@@ -0,0 +1,6 @@
package test;
class TwoSetters {
void setSize(String size) { }
void setSize(int size) { }
}

View File

@@ -0,0 +1,6 @@
package test
open class TwoSetters() {
open fun setSize(p0: String?) { }
open fun setSize(p0: Int) { }
}

View File

@@ -0,0 +1,7 @@
namespace test
open class test.TwoSetters : jet.Any {
final /*constructor*/ fun <init>(): test.TwoSetters
open fun setSize(/*0*/ p0: jet.Int): jet.Tuple0
open fun setSize(/*0*/ p0: jet.String?): jet.Tuple0
}