程序包 com.iohao.game.action.skeleton.protocol.wrapper
package com.iohao.game.action.skeleton.protocol.wrapper
业务框架 - 内部协议 - 装箱、拆箱包装;解决协议碎片
主要解决两个问题:碎片协议、使用时可自动装箱和拆箱。
for example
// 可以方便的接收与返回基础类型的数据
@ActionController(6)
public class IntAction {
@ActionMethod(10)
public int int2int(int value) {
return value + 1;
}
@ActionMethod(12)
public List<Integer> intList2intList(List<Integer> intList) {
List<Integer> list = new ArrayList<>();
list.add(1);
list.add(2);
return list;
}
@ActionMethod(30)
public String string2string(String s) {
return s + 1;
}
@ActionMethod(32)
public List<String> stringList2stringList(List<String> stringList) {
List<String> list = new ArrayList<>();
list.add(11L + "");
list.add(22L + "");
return list;
}
}
- 作者:
- 渔民小镇
- 日期:
- 2023-06-09
-
类说明boolean 包装类boolean list 包装类对象类型的包装类int 包装类int list 包装类long 包装类long list 包装类string 包装类string list 包装类装箱、拆箱包装工具 解决协议碎片