@Test public void testPublicStaticInnerClass() { createProxy(new PublicStaticInnerClass()).toString(); assertEquals("toString = PublicStaticInnerClass", buff.toString()); }
@SuppressWarnings("unchecked") public <T> T createProxy(T obj, final InvocationHandler handler) { Class<?> c = obj.getClass(); Class<?> pc = getClassProxy(c); Constructor<?> cons; try { cons = pc.getConstructor(new Class<?>[] { InvocationHandler.class }); return (T) cons.newInstance(new Object[] { handler }); } catch (Exception e) { IllegalArgumentException ia = new IllegalArgumentException( "Could not create a new instance of the class " + pc.getName()); ia.initCause(e); throw ia; } }
CompilingProxyFactory extends ProxyFactory { @SuppressWarnings("unchecked") public <T> T createProxy(T obj, final InvocationHandler handler) { Class<?> c = obj.getClass(); Class<?> pc = getClassProxy(c); Constructor<?> cons; try { cons = pc.getConstructor(new Class<?>[] { InvocationHandler.class }); return (T) cons.newInstance(new Object[] { handler }); } catch (Exception e) { IllegalArgumentException ia = new IllegalArgumentException( "Could not create a new instance of the class " + pc.getName()); ia.initCause(e); throw ia; } } }
CompilingProxyFactory extends ProxyFactory { @SuppressWarnings("unchecked") public <T> T createProxy(T obj, final InvocationHandler handler) { Class<?> c = obj.getClass(); Class<?> pc = getClassProxy(c); Constructor<?> cons; try { cons = pc.getConstructor(new Class<?>[] { InvocationHandler.class }); return (T) cons.newInstance(new Object[] { handler }); } catch (Exception e) { IllegalArgumentException ia = new IllegalArgumentException( "Could not create a new instance of the class " + pc.getName()); ia.initCause(e); throw ia; } }  }
CompilingProxyFactory extends ProxyFactory { @SuppressWarnings("unchecked") public <T> T createProxy(T obj, final InvocationHandler handler) { Class<?> c = obj.getClass(); Class<?> pc = getClassProxy(c); Constructor<?> cons; try { cons = pc.getConstructor(new Class<?>[] { InvocationHandler.class }); return (T) cons.newInstance(new Object[] { handler }); } catch (Exception e) { IllegalArgumentException ia = new IllegalArgumentException( "Could not create a new instance of the class " + pc.getName()); ia.initCause(e); throw ia; } }  @SuppressWarnings("unchecked") T createProxy(T obj, final InvocationHandler handler); void setUseSystemJavaCompiler(boolean useSystemJavaCompiler); Class<?> getClassProxy(Class<?> c); HashMap<Class<?>, Class<?>> getProxyMap(); static String getUniqueFieldName(Class<?> c, String preferredFieldName); static boolean hasField(Class<?> c, String fieldName); }
CompilingProxyFactory extends ProxyFactory { @SuppressWarnings("unchecked") public <T> T createProxy(T obj, final InvocationHandler handler) { Class<?> c = obj.getClass(); Class<?> pc = getClassProxy(c); Constructor<?> cons; try { cons = pc.getConstructor(new Class<?>[] { InvocationHandler.class }); return (T) cons.newInstance(new Object[] { handler }); } catch (Exception e) { IllegalArgumentException ia = new IllegalArgumentException( "Could not create a new instance of the class " + pc.getName()); ia.initCause(e); throw ia; } }  @SuppressWarnings("unchecked") T createProxy(T obj, final InvocationHandler handler); void setUseSystemJavaCompiler(boolean useSystemJavaCompiler); Class<?> getClassProxy(Class<?> c); HashMap<Class<?>, Class<?>> getProxyMap(); static String getUniqueFieldName(Class<?> c, String preferredFieldName); static boolean hasField(Class<?> c, String fieldName);  }