private Method lookupMethod(final Object arg0) { if (!arg0Clazz.isInstance(arg0)) { throw new IllegalArgumentException(); } Method method = dispatcher.lookupVisitMethod( visitor.getClass(), (Class<? extends E>) arg0.getClass(), methodName, otherArgClassList); if (method == null) { List<Class> classList = new ArrayList<>(); classList.add(arg0Clazz); classList.addAll(otherArgClassList); throw new IllegalArgumentException("Method not found: " + methodName + "(" + classList + ")"); } return method; } };
private Method lookupMethod(final Object arg0) { if (!arg0Clazz.isInstance(arg0)) { throw new IllegalArgumentException(); } Method method = dispatcher.lookupVisitMethod( visitor.getClass(), (Class<? extends E>) arg0.getClass(), methodName, otherArgClassList); if (method == null) { List<Class> classList = new ArrayList<>(); classList.add(arg0Clazz); classList.addAll(otherArgClassList); throw new IllegalArgumentException("Method not found: " + methodName + "(" + classList + ")"); } return method; } };