/** * Returns methods implemented by a particular interface. * * @param interfaceName * @return */ public static List<Method> getInterfaceMethods(final String interfaceName) { final List<Method> result = Lists.newArrayList(); try { final Class<?> interfaceClass = Class.forName(interfaceName); // add interface methods to the list for (final Method method : interfaceClass.getMethods()) { result.add(method); } } catch (final ClassNotFoundException cnfe) { // just emit a warning and return an empty list System.err.println("warning: unable to get class for interface " + interfaceName); } return result; }