equal
deleted
inserted
replaced
72 private static Trees getJavacTrees(Class<?> argType, Object arg) { |
72 private static Trees getJavacTrees(Class<?> argType, Object arg) { |
73 try { |
73 try { |
74 ClassLoader cl = arg.getClass().getClassLoader(); |
74 ClassLoader cl = arg.getClass().getClassLoader(); |
75 Class<?> c = Class.forName("com.sun.tools.javac.api.JavacTrees", false, cl); |
75 Class<?> c = Class.forName("com.sun.tools.javac.api.JavacTrees", false, cl); |
76 argType = Class.forName(argType.getName(), false, cl); |
76 argType = Class.forName(argType.getName(), false, cl); |
77 Method m = c.getMethod("instance", new Class[] { argType }); |
77 Method m = c.getMethod("instance", new Class<?>[] { argType }); |
78 return (Trees) m.invoke(null, new Object[] { arg }); |
78 return (Trees) m.invoke(null, new Object[] { arg }); |
79 } catch (Throwable e) { |
79 } catch (Throwable e) { |
80 throw new AssertionError(e); |
80 throw new AssertionError(e); |
81 } |
81 } |
82 } |
82 } |