@Test public void testGenerateMethodResultClassName() { Assert.assertEquals( $__DemoStub.echoString_result.class.getName(), ThriftUtils.generateMethodResultClassName( com.alibaba.dubbo.rpc.gen.dubbo.Demo.class.getName(), "echoString" )); Assert.assertEquals( $__DemoStub.echoString_result.class.getName(), ExtensionLoader.getExtensionLoader( ClassNameGenerator.class ) .getExtension( DubboClassNameGenerator.NAME ).generateResultClassName ( com.alibaba.dubbo.rpc.gen.dubbo.Demo.class.getName(), "echoString" )); }
public static String generateMethodResultClassName( String serviceName, String method ) { int index = serviceName.lastIndexOf( "." ); if ( index > 0 ) { return new StringBuilder( 32 ) .append( serviceName.substring( 0, index + 1 ) ) .append( "$__" ) .append( serviceName.substring( index + 1 ) ) .append( "Stub$" ) .append( method ) .append( "_result" ) .toString(); } else { return new StringBuilder( 32 ) .append( "$__" ) .append( serviceName ) .append( "Stub$" ) .append( method ) .append( "_result" ) .toString(); } }
ThriftUtils { public static String generateMethodResultClassName( String serviceName, String method ) { int index = serviceName.lastIndexOf( "." ); if ( index > 0 ) { return new StringBuilder( 32 ) .append( serviceName.substring( 0, index + 1 ) ) .append( "$__" ) .append( serviceName.substring( index + 1 ) ) .append( "Stub$" ) .append( method ) .append( "_result" ) .toString(); } else { return new StringBuilder( 32 ) .append( "$__" ) .append( serviceName ) .append( "Stub$" ) .append( method ) .append( "_result" ) .toString(); } } }
ThriftUtils { public static String generateMethodResultClassName( String serviceName, String method ) { int index = serviceName.lastIndexOf( "." ); if ( index > 0 ) { return new StringBuilder( 32 ) .append( serviceName.substring( 0, index + 1 ) ) .append( "$__" ) .append( serviceName.substring( index + 1 ) ) .append( "Stub$" ) .append( method ) .append( "_result" ) .toString(); } else { return new StringBuilder( 32 ) .append( "$__" ) .append( serviceName ) .append( "Stub$" ) .append( method ) .append( "_result" ) .toString(); } }  }
ThriftUtils { public static String generateMethodResultClassName( String serviceName, String method ) { int index = serviceName.lastIndexOf( "." ); if ( index > 0 ) { return new StringBuilder( 32 ) .append( serviceName.substring( 0, index + 1 ) ) .append( "$__" ) .append( serviceName.substring( index + 1 ) ) .append( "Stub$" ) .append( method ) .append( "_result" ) .toString(); } else { return new StringBuilder( 32 ) .append( "$__" ) .append( serviceName ) .append( "Stub$" ) .append( method ) .append( "_result" ) .toString(); } }  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 ); }
ThriftUtils { public static String generateMethodResultClassName( String serviceName, String method ) { int index = serviceName.lastIndexOf( "." ); if ( index > 0 ) { return new StringBuilder( 32 ) .append( serviceName.substring( 0, index + 1 ) ) .append( "$__" ) .append( serviceName.substring( index + 1 ) ) .append( "Stub$" ) .append( method ) .append( "_result" ) .toString(); } else { return new StringBuilder( 32 ) .append( "$__" ) .append( serviceName ) .append( "Stub$" ) .append( method ) .append( "_result" ) .toString(); } }  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 );  }