SofaProtoUtils { public static Set<String> getMethodNames(String interfaceId) { HashSet<String> result = new HashSet<>(); Class interfaceClass = ClassUtils.forName(interfaceId); Method[] methods = interfaceClass.getMethods(); for (Method method : methods) { result.add(method.getName()); } return result; }  static boolean isProtoClass(Object object); static Set<String> getMethodNames(String interfaceId); static boolean checkIfUseGeneric(ConsumerConfig consumerConfig); static String getFullNameWithUniqueId(String fullMethodName, String uniqueId);  }
@Test public void testGetMethodNames() { String interfaceName = TestInterface.class.getName(); Set<String> methodNames = SofaProtoUtils.getMethodNames(interfaceName); Assert.assertEquals(2, methodNames.size()); Assert.assertTrue(methodNames.contains("methodA")); Assert.assertTrue(methodNames.contains("methodB")); }