Browse Source

Fix Iterator not having methods / fixed stdlibs not being reloadable

Jared 5 years ago
parent
commit
84b407af0d
No account linked to committer's email address

+ 1
- 1
JavaShared/src/main/java/org/openzen/zenscript/javashared/prepare/JavaPrepareDefinitionVisitor.java View File

95
 		}
95
 		}
96
 		
96
 		
97
 		{
97
 		{
98
-			JavaNativeClass iterator = new JavaNativeClass(JavaClass.ITERATOR);
98
+			JavaNativeClass iterator = new JavaNativeClass(new JavaClass("java.util", "Iterator", JavaClass.Kind.INTERFACE));
99
 			iterator.addMethod("empty", new JavaMethod(JavaClass.COLLECTIONS, JavaMethod.Kind.STATIC, "emptyIterator", false, "()Ljava/lang/Iterator;", JavaModifiers.STATIC | JavaModifiers.PUBLIC, false));
99
 			iterator.addMethod("empty", new JavaMethod(JavaClass.COLLECTIONS, JavaMethod.Kind.STATIC, "emptyIterator", false, "()Ljava/lang/Iterator;", JavaModifiers.STATIC | JavaModifiers.PUBLIC, false));
100
 			iterator.addInstanceMethod("hasNext", "hasNext", "()Z");
100
 			iterator.addInstanceMethod("hasNext", "hasNext", "()Z");
101
 			iterator.addInstanceMethod("next", "next", "()Ljava/lang/Object;");
101
 			iterator.addInstanceMethod("next", "next", "()Ljava/lang/Object;");

Loading…
Cancel
Save