equal
deleted
inserted
replaced
80 static Trees getJavacTrees(Class<?> argType, Object arg) { |
80 static Trees getJavacTrees(Class<?> argType, Object arg) { |
81 try { |
81 try { |
82 ClassLoader cl = arg.getClass().getClassLoader(); |
82 ClassLoader cl = arg.getClass().getClassLoader(); |
83 Class<?> c = Class.forName("com.sun.tools.javac.api.JavacTrees", false, cl); |
83 Class<?> c = Class.forName("com.sun.tools.javac.api.JavacTrees", false, cl); |
84 argType = Class.forName(argType.getName(), false, cl); |
84 argType = Class.forName(argType.getName(), false, cl); |
85 Method m = c.getMethod("instance", new Class<?>[] { argType }); |
85 Method m = c.getMethod("instance", argType); |
86 return (Trees) m.invoke(null, new Object[] { arg }); |
86 return (Trees) m.invoke(null, arg); |
87 } catch (Throwable e) { |
87 } catch (Throwable e) { |
88 throw new AssertionError(e); |
88 throw new AssertionError(e); |
89 } |
89 } |
90 } |
90 } |
91 |
91 |