use of org.apache.aries.proxy.weaving.WovenProxy in project aries by apache.
the class WovenSubclassGeneratorTest method getProxyInstance.
@Override
protected Object getProxyInstance(Class<?> proxyClass, InvocationListener listener) {
WovenProxy proxy = (WovenProxy) getProxyInstance(proxyClass);
proxy = proxy.org_apache_aries_proxy_weaving_WovenProxy_createNewProxyInstance(new SingleInstanceDispatcher(proxy), listener);
return proxy;
}
use of org.apache.aries.proxy.weaving.WovenProxy in project aries by apache.
the class WeavingProxyTest method checkProxyFinalMethods.
/**
* This method checks that we correctly proxy a class with final methods.
*/
@Test
public void checkProxyFinalMethods() throws Exception {
Bundle b = bundleContext.getBundle();
Callable<Object> c = new TestCallable();
Collection<Class<?>> classes = new ArrayList<Class<?>>();
Runnable r = new Runnable() {
public final void run() {
}
};
classes.add(r.getClass());
Object o = mgr.createDelegatingProxy(b, classes, c, r);
if (!!!(o instanceof WovenProxy))
fail("Proxy should be woven!");
}
Aggregations