Lines Matching refs:method
32 * Answer that calls the method in the Answer called "answer" that matches the type signature of
33 * the method being answered. An error will be thrown at runtime if the signature does not match
39 Method method = invocation.getMethod();
41 Method implementation = getClass().getMethod("answer", method.getParameterTypes());
42 if (!implementation.getReturnType().equals(method.getReturnType())) {
43 throw new RuntimeException("Found answer method does not have expected return "
44 + "type. Expected: " + method.getReturnType() + ", got "
51 throw new RuntimeException("Error invoking answer method", e);
56 throw new RuntimeException("Could not find answer method with the expected args "
57 + Arrays.toString(method.getParameterTypes()), e);