@Test public void buildSofaRequest() throws Exception { SofaRequest request = MessageBuilder.buildSofaRequest(Number.class, "intValue", new Class[0], CodecUtils.EMPTY_OBJECT_ARRAY); Assert.assertEquals(request.getInterfaceName(), Number.class.getName()); Assert.assertEquals(request.getMethodName(), "intValue"); Assert.assertArrayEquals(CodecUtils.EMPTY_OBJECT_ARRAY, request.getMethodArgs()); Assert.assertArrayEquals(StringUtils.EMPTY_STRING_ARRAY, request.getMethodArgSigs()); request = MessageBuilder.buildSofaRequest(Comparable.class, "compareTo", new Class[] { Object.class }, new Object[] { null }); Assert.assertEquals(request.getInterfaceName(), Comparable.class.getName()); Assert.assertEquals(request.getMethodName(), "compareTo"); Assert.assertArrayEquals(request.getMethodArgs(), new Object[] { null }); Assert.assertArrayEquals(request.getMethodArgSigs(), new String[] { "java.lang.Object" }); }
@Deprecated public static SofaRequest buildSofaRequest(Class<?> clazz, String method, Class[] argTypes, Object[] args) { SofaRequest request = new SofaRequest(); request.setInterfaceName(clazz.getName()); request.setMethodName(method); request.setMethodArgs(args == null ? CodecUtils.EMPTY_OBJECT_ARRAY : args); request.setMethodArgSigs(ClassTypeUtils.getTypeStrs(argTypes, true)); return request; }
MessageBuilder { @Deprecated public static SofaRequest buildSofaRequest(Class<?> clazz, String method, Class[] argTypes, Object[] args) { SofaRequest request = new SofaRequest(); request.setInterfaceName(clazz.getName()); request.setMethodName(method); request.setMethodArgs(args == null ? CodecUtils.EMPTY_OBJECT_ARRAY : args); request.setMethodArgSigs(ClassTypeUtils.getTypeStrs(argTypes, true)); return request; } }
MessageBuilder { @Deprecated public static SofaRequest buildSofaRequest(Class<?> clazz, String method, Class[] argTypes, Object[] args) { SofaRequest request = new SofaRequest(); request.setInterfaceName(clazz.getName()); request.setMethodName(method); request.setMethodArgs(args == null ? CodecUtils.EMPTY_OBJECT_ARRAY : args); request.setMethodArgSigs(ClassTypeUtils.getTypeStrs(argTypes, true)); return request; }  }
MessageBuilder { @Deprecated public static SofaRequest buildSofaRequest(Class<?> clazz, String method, Class[] argTypes, Object[] args) { SofaRequest request = new SofaRequest(); request.setInterfaceName(clazz.getName()); request.setMethodName(method); request.setMethodArgs(args == null ? CodecUtils.EMPTY_OBJECT_ARRAY : args); request.setMethodArgSigs(ClassTypeUtils.getTypeStrs(argTypes, true)); return request; }  @Deprecated static SofaRequest buildSofaRequest(Class<?> clazz, String method, Class[] argTypes, Object[] args); static SofaRequest buildSofaRequest(Class<?> clazz, Method method, Class[] argTypes, Object[] args); static SofaResponse buildSofaErrorResponse(String errorMsg); }
MessageBuilder { @Deprecated public static SofaRequest buildSofaRequest(Class<?> clazz, String method, Class[] argTypes, Object[] args) { SofaRequest request = new SofaRequest(); request.setInterfaceName(clazz.getName()); request.setMethodName(method); request.setMethodArgs(args == null ? CodecUtils.EMPTY_OBJECT_ARRAY : args); request.setMethodArgSigs(ClassTypeUtils.getTypeStrs(argTypes, true)); return request; }  @Deprecated static SofaRequest buildSofaRequest(Class<?> clazz, String method, Class[] argTypes, Object[] args); static SofaRequest buildSofaRequest(Class<?> clazz, Method method, Class[] argTypes, Object[] args); static SofaResponse buildSofaErrorResponse(String errorMsg);  }