Fields alternative signature processing with refactoring of AlternativeSignatureData
Refactoring details: - Move and rename AlternativeSignatureData to kotlinSignature.AlternativeMethodSignatureData - Extract TypeTransforming visitor - Extract AlternativeSignatureMistmatchException - Move errors, return type, and syntax processing to base class
This commit is contained in:
@@ -0,0 +1,38 @@
|
||||
/*
|
||||
* Copyright 2010-2012 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 test;
|
||||
|
||||
import java.lang.String;
|
||||
import java.util.ArrayList;
|
||||
|
||||
import jet.runtime.typeinfo.KotlinSignature;
|
||||
|
||||
public class PropertyArrayTypes<T> {
|
||||
@KotlinSignature("fun PropertyArrayTypes(genericTypeParam : T)")
|
||||
public PropertyArrayTypes(T genericTypeParam) {
|
||||
// For initializing genericType field in kotlin
|
||||
}
|
||||
|
||||
@KotlinSignature("var arrayOfArrays : Array<Array<String>>")
|
||||
public String[][] arrayOfArrays;
|
||||
|
||||
@KotlinSignature("var array : Array<String>")
|
||||
public String[] array;
|
||||
|
||||
@KotlinSignature("var genericArray : Array<T>")
|
||||
public T[] genericArray;
|
||||
}
|
||||
@@ -0,0 +1,9 @@
|
||||
package test
|
||||
|
||||
import java.util.*
|
||||
|
||||
public open class PropertyArrayTypes<T>(p0 : T) : java.lang.Object() {
|
||||
public var arrayOfArrays : Array<Array<String>> = Array<Array<String>>(0, { Array<String>(0, { "" })})
|
||||
public var array : Array<String> = Array<String>(0, { "" })
|
||||
public var genericArray : Array<T> = Array<T>(0, { p0 })
|
||||
}
|
||||
@@ -0,0 +1,8 @@
|
||||
namespace test
|
||||
|
||||
public open class test.PropertyArrayTypes</*0*/ T : jet.Any?> : java.lang.Object {
|
||||
public final /*constructor*/ fun </*0*/ T : jet.Any?><init>(/*0*/ p0: T): test.PropertyArrayTypes<T>
|
||||
public final var array: jet.Array<jet.String>
|
||||
public final var arrayOfArrays: jet.Array<jet.Array<jet.String>>
|
||||
public final var genericArray: jet.Array<T>
|
||||
}
|
||||
@@ -0,0 +1,41 @@
|
||||
/*
|
||||
* Copyright 2010-2012 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 test;
|
||||
|
||||
import java.lang.String;
|
||||
import java.util.ArrayList;
|
||||
|
||||
import jet.runtime.typeinfo.KotlinSignature;
|
||||
|
||||
public class PropertyComplexTypes<T> {
|
||||
@KotlinSignature("fun PropertyComplexTypes(genericTypeParam : T)")
|
||||
public PropertyComplexTypes(T genericTypeParam) {
|
||||
// For initializing genericType field in kotlin
|
||||
}
|
||||
|
||||
@KotlinSignature("var genericType : T")
|
||||
public T genericType;
|
||||
|
||||
@KotlinSignature("var listDefinedGeneric : ArrayList<String>")
|
||||
public ArrayList<String> listDefinedGeneric;
|
||||
|
||||
@KotlinSignature("var listGeneric : ArrayList<T>")
|
||||
public ArrayList<T> listGeneric;
|
||||
|
||||
@KotlinSignature("var listOfGenericList : ArrayList<ArrayList<T>>")
|
||||
public ArrayList<ArrayList<T>> listOfGenericList;
|
||||
}
|
||||
@@ -0,0 +1,10 @@
|
||||
package test
|
||||
|
||||
import java.util.*
|
||||
|
||||
public open class PropertyComplexTypes<T>(p0 : T) : java.lang.Object() {
|
||||
public var genericType : T = p0
|
||||
public var listDefinedGeneric : ArrayList<String> = ArrayList<String>()
|
||||
public var listGeneric : ArrayList<T> = ArrayList<T>()
|
||||
public var listOfGenericList : ArrayList<ArrayList<T>> = ArrayList<ArrayList<T>>()
|
||||
}
|
||||
@@ -0,0 +1,9 @@
|
||||
namespace test
|
||||
|
||||
public open class test.PropertyComplexTypes</*0*/ T : jet.Any?> : java.lang.Object {
|
||||
public final /*constructor*/ fun </*0*/ T : jet.Any?><init>(/*0*/ p0: T): test.PropertyComplexTypes<T>
|
||||
public final var genericType: T
|
||||
public final var listDefinedGeneric: java.util.ArrayList<jet.String>
|
||||
public final var listGeneric: java.util.ArrayList<T>
|
||||
public final var listOfGenericList: java.util.ArrayList<java.util.ArrayList<T>>
|
||||
}
|
||||
@@ -0,0 +1,34 @@
|
||||
/*
|
||||
* Copyright 2010-2012 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 test;
|
||||
|
||||
import java.lang.String;
|
||||
import jet.runtime.typeinfo.KotlinSignature;
|
||||
|
||||
public class PropertySimpleType {
|
||||
@KotlinSignature("val publicFieldVal : String")
|
||||
public String publicFieldVal;
|
||||
|
||||
@KotlinSignature("var publicFieldVar : String?")
|
||||
public String publicFieldVar;
|
||||
|
||||
@KotlinSignature("var protectedField : String")
|
||||
protected String protectedField;
|
||||
|
||||
@KotlinSignature("var privateField : String")
|
||||
private String privateField;
|
||||
}
|
||||
@@ -0,0 +1,9 @@
|
||||
package test
|
||||
|
||||
import java.util.*
|
||||
|
||||
public open class PropertySimpleType : java.lang.Object() {
|
||||
public var publicFieldVal : String = ""
|
||||
public var publicFieldVar : String? = null
|
||||
protected var protectedField : String = ""
|
||||
}
|
||||
@@ -0,0 +1,8 @@
|
||||
namespace test
|
||||
|
||||
public open class test.PropertySimpleType : java.lang.Object {
|
||||
public final /*constructor*/ fun <init>(): test.PropertySimpleType
|
||||
protected final var protectedField: jet.String
|
||||
public final var publicFieldVal: jet.String
|
||||
public final var publicFieldVar: jet.String?
|
||||
}
|
||||
Reference in New Issue
Block a user