@Test(dataProvider = "proxyInterfaces") publicvoid testMethod(Class<?>[] proxyInterfaces, boolean isVarArgs) throws Throwable { // check if the first proxy interface with the method named "call" declares var result
Method m = proxyInterfaces[0].getMethod("call", Object[].class);
assertTrue(m.isVarArgs() == isVarArgs);
// the method in the generated proxy class should match the method // declared in the proxy interface
Object proxy = Proxy.newProxyInstance(TestVarArgs.class.getClassLoader(),
proxyInterfaces, IH); Class<?> proxyClass = proxy.getClass();
assertTrue(Proxy.isProxyClass(proxyClass));
Method method = proxyClass.getMethod("call", Object[].class);
assertTrue(method.isVarArgs() == isVarArgs);
Die Informationen auf dieser Webseite wurden
nach bestem Wissen sorgfältig zusammengestellt. Es wird jedoch weder Vollständigkeit, noch Richtigkeit,
noch Qualität der bereit gestellten Informationen zugesichert.
Bemerkung:
Die farbliche Syntaxdarstellung und die Messung sind noch experimentell.