|
@@ -17,8 +17,23 @@ public class Globals implements ZenCodeGlobals {
|
17
|
17
|
@Global
|
18
|
18
|
public static TestClass something = new TestClass("hello");
|
19
|
19
|
|
|
20
|
+ @Global
|
|
21
|
+ public static TestClass[] makeArray(int amount) {
|
|
22
|
+ TestClass[] result = new TestClass[amount];
|
|
23
|
+ for (int i = 0; i < result.length; i++)
|
|
24
|
+ result[i] = new TestClass("test " + i);
|
|
25
|
+ return result;
|
|
26
|
+ }
|
|
27
|
+
|
20
|
28
|
@Global
|
21
|
29
|
public static void println(String message) {
|
22
|
30
|
System.out.println(message);
|
23
|
31
|
}
|
|
32
|
+
|
|
33
|
+ @Global
|
|
34
|
+ public static void printMany(TestClass[] objects) {
|
|
35
|
+ System.out.println(objects.length + " objects present:");
|
|
36
|
+ for (TestClass object : objects)
|
|
37
|
+ System.out.println(" - " + object.getName());
|
|
38
|
+ }
|
24
|
39
|
}
|