use of org.apache.aries.proxy.impl.SingleInstanceDispatcher in project aries by apache.
the class WovenProxyPlusSubclassGeneratorTest 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.impl.SingleInstanceDispatcher in project aries by apache.
the class WovenSubclassGeneratorTest method testCovariant.
/**
* Test a covariant override method
*/
@Test
public void testCovariant() throws Exception {
testCallable = new SingleInstanceDispatcher(COVARIANT_CLASS.newInstance());
Object o = setDelegate(getProxyInstance(getProxyClass(COVARIANT_CLASS)), testCallable);
Class<?> generatedProxySubclass = o.getClass();
Method m = generatedProxySubclass.getDeclaredMethod("getCovariant", new Class[] {});
Object returned = m.invoke(o);
assertTrue("Object was of wrong type: " + returned.getClass().getSimpleName(), COVARIANT_CLASS.isInstance(returned));
}
use of org.apache.aries.proxy.impl.SingleInstanceDispatcher in project aries by apache.
the class WovenProxyGeneratorTest 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.impl.SingleInstanceDispatcher in project aries by apache.
the class WovenSubclassGeneratorTest method testGenerics.
/**
* Test a covariant override method
*/
@Test
public void testGenerics() throws Exception {
testCallable = new SingleInstanceDispatcher(GENERIC_CLASS.newInstance());
super.testGenerics();
}
use of org.apache.aries.proxy.impl.SingleInstanceDispatcher 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;
}
Aggregations