@@ -311,7 +311,7 @@ public static List<Class<?>> scanPackageList(String location) {
311
311
return new ArrayList <>(classes );
312
312
}
313
313
314
- private static void enhance (GenerateOperation generateOperation , List <IProtocolRegistration > enhanceList ) {
314
+ public static void enhance (GenerateOperation generateOperation , List <IProtocolRegistration > enhanceList ) {
315
315
try {
316
316
enhanceProtocolBefore (generateOperation );
317
317
enhanceProtocolRegistration (enhanceList );
@@ -421,7 +421,7 @@ private static List<Field> customFieldOrder(Class<?> clazz, List<Field> fields)
421
421
return notCompatibleFields ;
422
422
}
423
423
424
- private static ProtocolRegistration parseProtocolRegistration (Class <?> clazz , ProtocolModule module ) {
424
+ public static ProtocolRegistration parseProtocolRegistration (Class <?> clazz , ProtocolModule module ) {
425
425
var protocolId = ProtocolManager .protocolId (clazz );
426
426
var declaredFields = getFields (clazz );
427
427
// 对象需要被序列化的属性
@@ -637,7 +637,7 @@ public static Set<Short> getAllSubProtocolIds(short protocolId) {
637
637
638
638
// 协议智能语法分析,错误的协议定义将无法启动程序并给出错误警告
639
639
//-----------------------------------------------------------------------
640
- private static void initProtocolClass (short protocolId , Class <?> clazz ) {
640
+ public static void initProtocolClass (short protocolId , Class <?> clazz ) {
641
641
// 协议号重复定义
642
642
if (protocolIdMap .containsKey (clazz )) {
643
643
throw new RunException ("duplicate protocol:[{}] protocolId:[{}] and [protocolId:{}]" , clazz .getSimpleName (), protocolIdMap .get (clazz ), protocolId );
0 commit comments