ThriftUtils { public static String generateMethodResultClassNameThrift(String serviceName, String methodName) { int index = serviceName.indexOf("$"); if (index > 0) { return new StringBuilder(32) .append(serviceName, 0, index + 1) .append(methodName) .append("_result") .toString(); } return null; }  static String generateMethodArgsClassName(String serviceName, String methodName); static String generateMethodResultClassName(String serviceName, String method); static String generateSetMethodName(String fieldName); static String generateGetMethodName(String fieldName); static String generateMethodArgsClassNameThrift(String serviceName, String methodName); static String generateMethodResultClassNameThrift(String serviceName, String methodName);  }
@Test public void testGenerateMethodResultClassNameThrift() { Assertions.assertEquals(org.apache.dubbo.rpc.gen.thrift.Demo.echoString_result.class.getName(), ThriftUtils.generateMethodResultClassNameThrift( org.apache.dubbo.rpc.gen.thrift.Demo.Iface.class.getName(), "echoString")); Assertions.assertEquals(org.apache.dubbo.rpc.gen.thrift.Demo.echoString_result.class.getName(), ExtensionLoader.getExtensionLoader(ClassNameGenerator.class) .getExtension(ThriftClassNameGenerator.NAME).generateResultClassName( org.apache.dubbo.rpc.gen.thrift.Demo.Iface.class.getName(), "echoString")); }