1 15 16 package javassist.reflect; 17 18 import javassist.CannotCompileException; 19 import javassist.NotFoundException; 20 import javassist.ClassPool; 21 22 109 public class Loader extends javassist.Loader { 110 protected Reflection reflection; 111 112 123 public static void main(String [] args) throws Throwable { 124 Loader cl = new Loader(); 125 cl.run(args); 126 } 127 128 131 public Loader() throws CannotCompileException, NotFoundException { 132 super(); 133 delegateLoadingOf("javassist.reflect.Loader"); 134 135 reflection = new Reflection(); 136 ClassPool pool = ClassPool.getDefault(); 137 addTranslator(pool, reflection); 138 } 139 140 157 public boolean makeReflective(String clazz, 158 String metaobject, String metaclass) 159 throws CannotCompileException, NotFoundException 160 { 161 return reflection.makeReflective(clazz, metaobject, metaclass); 162 } 163 } 164 | Popular Tags |