Merge pull request #137 from LucaLq/main

perf[net]: adjust access modifier
This commit is contained in:
jaysunxiao authored and GitHub committed 2024-11-13 19:59:19 +08:00
commit 290e8efcda
1 file changed
+3 -3
@@ -311,7 +311,7 @@ public class ProtocolAnalysis {
return new ArrayList<>(classes); return new ArrayList<>(classes);
} }
private static void enhance(GenerateOperation generateOperation, List<IProtocolRegistration> enhanceList) { public static void enhance(GenerateOperation generateOperation, List<IProtocolRegistration> enhanceList) {
try { try {
enhanceProtocolBefore(generateOperation); enhanceProtocolBefore(generateOperation);
enhanceProtocolRegistration(enhanceList); enhanceProtocolRegistration(enhanceList);
@@ -421,7 +421,7 @@ public class ProtocolAnalysis {
return notCompatibleFields; return notCompatibleFields;
} }
private static ProtocolRegistration parseProtocolRegistration(Class<?> clazz, ProtocolModule module) { public static ProtocolRegistration parseProtocolRegistration(Class<?> clazz, ProtocolModule module) {
var protocolId = ProtocolManager.protocolId(clazz); var protocolId = ProtocolManager.protocolId(clazz);
var declaredFields = getFields(clazz); var declaredFields = getFields(clazz);
// 对象需要被序列化的属性 // 对象需要被序列化的属性
@@ -637,7 +637,7 @@ public class ProtocolAnalysis {
// 协议智能语法分析,错误的协议定义将无法启动程序并给出错误警告 // 协议智能语法分析,错误的协议定义将无法启动程序并给出错误警告
//----------------------------------------------------------------------- //-----------------------------------------------------------------------
private static void initProtocolClass(short protocolId, Class<?> clazz) { public static void initProtocolClass(short protocolId, Class<?> clazz) {
// 协议号重复定义 // 协议号重复定义
if (protocolIdMap.containsKey(clazz)) { if (protocolIdMap.containsKey(clazz)) {
throw new RunException("duplicate protocol:[{}] protocolId:[{}] and [protocolId:{}]", clazz.getSimpleName(), protocolIdMap.get(clazz), protocolId); throw new RunException("duplicate protocol:[{}] protocolId:[{}] and [protocolId:{}]", clazz.getSimpleName(), protocolIdMap.get(clazz), protocolId);