|
@@ -5,10 +5,6 @@
|
5
|
5
|
*/
|
6
|
6
|
package org.openzen.zenscript.javashared.prepare;
|
7
|
7
|
|
8
|
|
-import org.openzen.zenscript.javashared.JavaNativeClass;
|
9
|
|
-import java.util.HashMap;
|
10
|
|
-import java.util.List;
|
11
|
|
-import java.util.Map;
|
12
|
8
|
import org.openzen.zenscript.codemodel.HighLevelDefinition;
|
13
|
9
|
import org.openzen.zenscript.codemodel.annotations.NativeTag;
|
14
|
10
|
import org.openzen.zenscript.codemodel.definition.AliasDefinition;
|
|
@@ -33,8 +29,13 @@ import org.openzen.zenscript.javashared.JavaCompiledModule;
|
33
|
29
|
import org.openzen.zenscript.javashared.JavaContext;
|
34
|
30
|
import org.openzen.zenscript.javashared.JavaMethod;
|
35
|
31
|
import org.openzen.zenscript.javashared.JavaModifiers;
|
|
32
|
+import org.openzen.zenscript.javashared.JavaNativeClass;
|
36
|
33
|
import org.openzen.zenscript.javashared.JavaVariantOption;
|
37
|
34
|
|
|
35
|
+import java.util.HashMap;
|
|
36
|
+import java.util.List;
|
|
37
|
+import java.util.Map;
|
|
38
|
+
|
38
|
39
|
/**
|
39
|
40
|
*
|
40
|
41
|
* @author Hoofdgebruiker
|
|
@@ -72,7 +73,7 @@ public class JavaPrepareDefinitionVisitor implements DefinitionVisitor<JavaClass
|
72
|
73
|
JavaNativeClass list = new JavaNativeClass(new JavaClass("java.util", "List", JavaClass.Kind.INTERFACE));
|
73
|
74
|
JavaClass arrayList = new JavaClass("java.util", "ArrayList", JavaClass.Kind.CLASS);
|
74
|
75
|
list.addMethod("constructor", JavaMethod.getNativeConstructor(arrayList, "()V"));
|
75
|
|
- list.addInstanceMethod("add", "add", "(Ljava/lang/Object;)Z"); List<?> l;
|
|
76
|
+ list.addInstanceMethod("add", "add", "(TE;)Z"); List<?> l;
|
76
|
77
|
list.addInstanceMethod("insert", "add", "(Ljava/lang/Object;I)V");
|
77
|
78
|
list.addInstanceMethod("remove", "remove", "(Ljava/lang/Object;)Z");
|
78
|
79
|
list.addInstanceMethod("indexOf", "indexOf", "(Ljava/lang/Object;)I");
|