@Test public void testGetSoapClientMethod() throws Exception { Method method = soapClientHandler.getSoapClientMethod(soapClient, SimilarMockSoapClient.class.getMethod( "identityCall", Object[].class, Object.class, Object.class)); assertEquals(MockSoapClient.class.getMethod("identityCall", Object[].class), method); }
@Override public Method getSoapClientMethod(T soapClient, Method method) throws NoSuchMethodException { for (Method soapClientMethod : soapClient.getClass().getMethods()) { if (method.getName().equals(soapClientMethod.getName()) && method.getReturnType().equals(soapClientMethod.getReturnType())) { return soapClientMethod; } } throw new NoSuchMethodException("No method named " + method.getName() + " with return type " + method.getReturnType() + " found."); }
SoapClientHandler implements SoapClientHandlerInterface<T> { @Override public Method getSoapClientMethod(T soapClient, Method method) throws NoSuchMethodException { for (Method soapClientMethod : soapClient.getClass().getMethods()) { if (method.getName().equals(soapClientMethod.getName()) && method.getReturnType().equals(soapClientMethod.getReturnType())) { return soapClientMethod; } } throw new NoSuchMethodException("No method named " + method.getName() + " with return type " + method.getReturnType() + " found."); } }
SoapClientHandler implements SoapClientHandlerInterface<T> { @Override public Method getSoapClientMethod(T soapClient, Method method) throws NoSuchMethodException { for (Method soapClientMethod : soapClient.getClass().getMethods()) { if (method.getName().equals(soapClientMethod.getName()) && method.getReturnType().equals(soapClientMethod.getReturnType())) { return soapClientMethod; } } throw new NoSuchMethodException("No method named " + method.getName() + " with return type " + method.getReturnType() + " found."); } protected  SoapClientHandler(); }
SoapClientHandler implements SoapClientHandlerInterface<T> { @Override public Method getSoapClientMethod(T soapClient, Method method) throws NoSuchMethodException { for (Method soapClientMethod : soapClient.getClass().getMethods()) { if (method.getName().equals(soapClientMethod.getName()) && method.getReturnType().equals(soapClientMethod.getReturnType())) { return soapClientMethod; } } throw new NoSuchMethodException("No method named " + method.getName() + " with return type " + method.getReturnType() + " found."); } protected  SoapClientHandler(); @Override Method getSoapClientMethod(T soapClient, Method method); }
SoapClientHandler implements SoapClientHandlerInterface<T> { @Override public Method getSoapClientMethod(T soapClient, Method method) throws NoSuchMethodException { for (Method soapClientMethod : soapClient.getClass().getMethods()) { if (method.getName().equals(soapClientMethod.getName()) && method.getReturnType().equals(soapClientMethod.getReturnType())) { return soapClientMethod; } } throw new NoSuchMethodException("No method named " + method.getName() + " with return type " + method.getReturnType() + " found."); } protected  SoapClientHandler(); @Override Method getSoapClientMethod(T soapClient, Method method);  }