1 46 47 package org.codehaus.groovy.classgen; 48 49 import groovy.lang.Closure; 50 import groovy.lang.MetaClass; 51 52 import org.codehaus.groovy.runtime.InvokerHelper; 53 54 55 62 public class DumpClass2 { 63 64 private String bar = (String ) InvokerHelper.invokeStaticMethod("InvokerHelper", "getMetaClass", null); 65 private static String [] foo = { "hello", "world" }; 66 67 public DumpClass2(Object foo) { 68 } 69 70 public String [] getFoo() { 71 return foo; 72 } 73 74 public Object makeClosure() { 75 return new Closure(this) { 76 public void doCall() { 77 78 } 79 public MetaClass getMetaClass() { 80 return null; 81 } 82 83 public void setMetaClass(MetaClass metaClass) { 84 } 85 }; 86 } 87 public String getBar() { 88 return bar; 89 } 90 91 public Object callConstructor() { 92 return InvokerHelper.invokeConstructor("java.lang.String", "hello"); 93 } 94 } 95 | Popular Tags |