From 3ff774074cb5fc9c2e638d59cec9dcd9fb35ddc9 Mon Sep 17 00:00:00 2001 From: sun Date: Wed, 11 Oct 2023 19:17:17 +0800 Subject: [PATCH] chore[protocol]: code comments --- .../src/main/java/com/zfoo/protocol/anno/Compatible.java | 3 +++ protocol/src/main/java/com/zfoo/protocol/anno/Note.java | 3 +++ .../src/main/java/com/zfoo/protocol/anno/Protocol.java | 7 +++++++ 3 files changed, 13 insertions(+) diff --git a/protocol/src/main/java/com/zfoo/protocol/anno/Compatible.java b/protocol/src/main/java/com/zfoo/protocol/anno/Compatible.java index 6edc5e245..76e8d028f 100644 --- a/protocol/src/main/java/com/zfoo/protocol/anno/Compatible.java +++ b/protocol/src/main/java/com/zfoo/protocol/anno/Compatible.java @@ -15,6 +15,9 @@ import java.lang.annotation.*; /** + * EN: Make the fields of the old and new protocols compatible in different version + * CN: 让新老协议的字段前后兼容 + * * @author godotg */ @Documented diff --git a/protocol/src/main/java/com/zfoo/protocol/anno/Note.java b/protocol/src/main/java/com/zfoo/protocol/anno/Note.java index 101b20fc4..9af8c0289 100644 --- a/protocol/src/main/java/com/zfoo/protocol/anno/Note.java +++ b/protocol/src/main/java/com/zfoo/protocol/anno/Note.java @@ -15,6 +15,9 @@ import java.lang.annotation.*; /** + * EN: Generate comments in other languages + * CN: 生成其它语言的注释 + * * @author meiw */ @Documented diff --git a/protocol/src/main/java/com/zfoo/protocol/anno/Protocol.java b/protocol/src/main/java/com/zfoo/protocol/anno/Protocol.java index 2cd334177..0cb61cb21 100644 --- a/protocol/src/main/java/com/zfoo/protocol/anno/Protocol.java +++ b/protocol/src/main/java/com/zfoo/protocol/anno/Protocol.java @@ -15,6 +15,9 @@ import java.lang.annotation.*; /** + * EN: Unique protocol number + * CN: 唯一的协议号 + * * @author meiw */ @Documented @@ -24,6 +27,10 @@ short id() default 0; + /** + * EN: Use Javassist bytecode to enhance serialization of the protocol + * CN: 使用Javassist字节码增强协议的序列化 + */ boolean enhance() default true; }