From a77941232a20cb773de8ef6eebc4361820120fff Mon Sep 17 00:00:00 2001 From: godotg Date: Thu, 11 Jul 2024 18:44:15 +0800 Subject: [PATCH] chore[protocol]: rename boolean to bool --- .../java/com/zfoo/protocol/registration/EnhanceUtils.java | 2 +- .../java/com/zfoo/protocol/registration/ProtocolAnalysis.java | 4 ++-- .../com/zfoo/protocol/serializer/cpp/CodeGenerateCpp.java | 2 +- .../cpp/{CppBooleanSerializer.java => CppBoolSerializer.java} | 2 +- .../zfoo/protocol/serializer/csharp/CodeGenerateCsharp.java | 2 +- .../{CsBooleanSerializer.java => CsBoolSerializer.java} | 2 +- .../serializer/ecmascript/CodeGenerateEcmaScript.java | 2 +- .../{EsBooleanSerializer.java => EsBoolSerializer.java} | 2 +- ...hanceBooleanSerializer.java => EnhanceBoolSerializer.java} | 2 +- .../protocol/serializer/gdscript/CodeGenerateGdScript.java | 2 +- .../{GdBooleanSerializer.java => GdBoolSerializer.java} | 2 +- .../zfoo/protocol/serializer/golang/CodeGenerateGolang.java | 2 +- .../{GoBooleanSerializer.java => GoBoolSerializer.java} | 2 +- .../com/zfoo/protocol/serializer/java/CodeGenerateJava.java | 2 +- .../{JavaBooleanSerializer.java => JavaBoolSerializer.java} | 2 +- .../serializer/javascript/CodeGenerateJavaScript.java | 2 +- .../{JsBooleanSerializer.java => JsBoolSerializer.java} | 2 +- .../zfoo/protocol/serializer/kotlin/CodeGenerateKotlin.java | 2 +- .../{KtBooleanSerializer.java => KtBoolSerializer.java} | 2 +- .../com/zfoo/protocol/serializer/lua/CodeGenerateLua.java | 2 +- .../lua/{LuaBooleanSerializer.java => LuaBoolSerializer.java} | 2 +- .../com/zfoo/protocol/serializer/php/CodeGeneratePhp.java | 2 +- .../php/{PhpBooleanSerializer.java => PhpBoolSerializer.java} | 3 +-- .../zfoo/protocol/serializer/python/CodeGeneratePython.java | 2 +- .../{PyBooleanSerializer.java => PyBoolSerializer.java} | 2 +- .../reflect/{BooleanSerializer.java => BoolSerializer.java} | 4 ++-- .../com/zfoo/protocol/serializer/scala/CodeGenerateScala.java | 2 +- .../{ScalaBooleanSerializer.java => ScalaBoolSerializer.java} | 2 +- .../serializer/typescript/CodeGenerateTypeScript.java | 2 +- .../{TsBooleanSerializer.java => TsBoolSerializer.java} | 2 +- .../test/java/com/zfoo/protocol/generate/GenerateTesting.java | 3 ++- 31 files changed, 34 insertions(+), 34 deletions(-) rename protocol/src/main/java/com/zfoo/protocol/serializer/cpp/{CppBooleanSerializer.java => CppBoolSerializer.java} (96%) rename protocol/src/main/java/com/zfoo/protocol/serializer/csharp/{CsBooleanSerializer.java => CsBoolSerializer.java} (96%) rename protocol/src/main/java/com/zfoo/protocol/serializer/ecmascript/{EsBooleanSerializer.java => EsBoolSerializer.java} (96%) rename protocol/src/main/java/com/zfoo/protocol/serializer/enhance/{EnhanceBooleanSerializer.java => EnhanceBoolSerializer.java} (97%) rename protocol/src/main/java/com/zfoo/protocol/serializer/gdscript/{GdBooleanSerializer.java => GdBoolSerializer.java} (96%) rename protocol/src/main/java/com/zfoo/protocol/serializer/golang/{GoBooleanSerializer.java => GoBoolSerializer.java} (96%) rename protocol/src/main/java/com/zfoo/protocol/serializer/java/{JavaBooleanSerializer.java => JavaBoolSerializer.java} (96%) rename protocol/src/main/java/com/zfoo/protocol/serializer/javascript/{JsBooleanSerializer.java => JsBoolSerializer.java} (96%) rename protocol/src/main/java/com/zfoo/protocol/serializer/kotlin/{KtBooleanSerializer.java => KtBoolSerializer.java} (96%) rename protocol/src/main/java/com/zfoo/protocol/serializer/lua/{LuaBooleanSerializer.java => LuaBoolSerializer.java} (96%) rename protocol/src/main/java/com/zfoo/protocol/serializer/php/{PhpBooleanSerializer.java => PhpBoolSerializer.java} (94%) rename protocol/src/main/java/com/zfoo/protocol/serializer/python/{PyBooleanSerializer.java => PyBoolSerializer.java} (96%) rename protocol/src/main/java/com/zfoo/protocol/serializer/reflect/{BooleanSerializer.java => BoolSerializer.java} (91%) rename protocol/src/main/java/com/zfoo/protocol/serializer/scala/{ScalaBooleanSerializer.java => ScalaBoolSerializer.java} (96%) rename protocol/src/main/java/com/zfoo/protocol/serializer/typescript/{TsBooleanSerializer.java => TsBoolSerializer.java} (96%) diff --git a/protocol/src/main/java/com/zfoo/protocol/registration/EnhanceUtils.java b/protocol/src/main/java/com/zfoo/protocol/registration/EnhanceUtils.java index 13624a772..f90ad408e 100644 --- a/protocol/src/main/java/com/zfoo/protocol/registration/EnhanceUtils.java +++ b/protocol/src/main/java/com/zfoo/protocol/registration/EnhanceUtils.java @@ -69,7 +69,7 @@ public abstract class EnhanceUtils { } } - enhanceSerializerMap.put(BooleanSerializer.INSTANCE, new EnhanceBooleanSerializer()); + enhanceSerializerMap.put(BoolSerializer.INSTANCE, new EnhanceBoolSerializer()); enhanceSerializerMap.put(ByteSerializer.INSTANCE, new EnhanceByteSerializer()); enhanceSerializerMap.put(ShortSerializer.INSTANCE, new EnhanceShortSerializer()); enhanceSerializerMap.put(IntSerializer.INSTANCE, new EnhanceIntSerializer()); diff --git a/protocol/src/main/java/com/zfoo/protocol/registration/ProtocolAnalysis.java b/protocol/src/main/java/com/zfoo/protocol/registration/ProtocolAnalysis.java index d2e588800..2452e893a 100644 --- a/protocol/src/main/java/com/zfoo/protocol/registration/ProtocolAnalysis.java +++ b/protocol/src/main/java/com/zfoo/protocol/registration/ProtocolAnalysis.java @@ -77,8 +77,8 @@ public class ProtocolAnalysis { static { // 初始化基础类型序列化器 - baseSerializerMap.put(boolean.class, BooleanSerializer.INSTANCE); - baseSerializerMap.put(Boolean.class, BooleanSerializer.INSTANCE); + baseSerializerMap.put(boolean.class, BoolSerializer.INSTANCE); + baseSerializerMap.put(Boolean.class, BoolSerializer.INSTANCE); baseSerializerMap.put(byte.class, ByteSerializer.INSTANCE); baseSerializerMap.put(Byte.class, ByteSerializer.INSTANCE); baseSerializerMap.put(short.class, ShortSerializer.INSTANCE); diff --git a/protocol/src/main/java/com/zfoo/protocol/serializer/cpp/CodeGenerateCpp.java b/protocol/src/main/java/com/zfoo/protocol/serializer/cpp/CodeGenerateCpp.java index ec391b33d..ffd83ec70 100644 --- a/protocol/src/main/java/com/zfoo/protocol/serializer/cpp/CodeGenerateCpp.java +++ b/protocol/src/main/java/com/zfoo/protocol/serializer/cpp/CodeGenerateCpp.java @@ -64,7 +64,7 @@ public void init(GenerateOperation generateOperation) { protocolOutputPath = FileUtils.joinPath(generateOperation.getProtocolPath(), protocolOutputRootPath); FileUtils.deleteFile(new File(protocolOutputPath)); - cppSerializerMap.put(BooleanSerializer.INSTANCE, new CppBooleanSerializer()); + cppSerializerMap.put(BoolSerializer.INSTANCE, new CppBoolSerializer()); cppSerializerMap.put(ByteSerializer.INSTANCE, new CppByteSerializer()); cppSerializerMap.put(ShortSerializer.INSTANCE, new CppShortSerializer()); cppSerializerMap.put(IntSerializer.INSTANCE, new CppIntSerializer()); diff --git a/protocol/src/main/java/com/zfoo/protocol/serializer/cpp/CppBooleanSerializer.java b/protocol/src/main/java/com/zfoo/protocol/serializer/cpp/CppBoolSerializer.java similarity index 96% rename from protocol/src/main/java/com/zfoo/protocol/serializer/cpp/CppBooleanSerializer.java rename to protocol/src/main/java/com/zfoo/protocol/serializer/cpp/CppBoolSerializer.java index 90b7c3b9c..eae6af899 100644 --- a/protocol/src/main/java/com/zfoo/protocol/serializer/cpp/CppBooleanSerializer.java +++ b/protocol/src/main/java/com/zfoo/protocol/serializer/cpp/CppBoolSerializer.java @@ -25,7 +25,7 @@ /** * @author godotg */ -public class CppBooleanSerializer implements ICppSerializer { +public class CppBoolSerializer implements ICppSerializer { @Override public Pair field(Field field, IFieldRegistration fieldRegistration) { diff --git a/protocol/src/main/java/com/zfoo/protocol/serializer/csharp/CodeGenerateCsharp.java b/protocol/src/main/java/com/zfoo/protocol/serializer/csharp/CodeGenerateCsharp.java index c031abb4e..eb9b116a3 100644 --- a/protocol/src/main/java/com/zfoo/protocol/serializer/csharp/CodeGenerateCsharp.java +++ b/protocol/src/main/java/com/zfoo/protocol/serializer/csharp/CodeGenerateCsharp.java @@ -63,7 +63,7 @@ public void init(GenerateOperation generateOperation) { protocolOutputPath = FileUtils.joinPath(generateOperation.getProtocolPath(), protocolOutputRootPath); FileUtils.deleteFile(new File(protocolOutputPath)); - csSerializerMap.put(BooleanSerializer.INSTANCE, new CsBooleanSerializer()); + csSerializerMap.put(BoolSerializer.INSTANCE, new CsBoolSerializer()); csSerializerMap.put(ByteSerializer.INSTANCE, new CsByteSerializer()); csSerializerMap.put(ShortSerializer.INSTANCE, new CsShortSerializer()); csSerializerMap.put(IntSerializer.INSTANCE, new CsIntSerializer()); diff --git a/protocol/src/main/java/com/zfoo/protocol/serializer/csharp/CsBooleanSerializer.java b/protocol/src/main/java/com/zfoo/protocol/serializer/csharp/CsBoolSerializer.java similarity index 96% rename from protocol/src/main/java/com/zfoo/protocol/serializer/csharp/CsBooleanSerializer.java rename to protocol/src/main/java/com/zfoo/protocol/serializer/csharp/CsBoolSerializer.java index 0cdbf6801..96d75e981 100644 --- a/protocol/src/main/java/com/zfoo/protocol/serializer/csharp/CsBooleanSerializer.java +++ b/protocol/src/main/java/com/zfoo/protocol/serializer/csharp/CsBoolSerializer.java @@ -24,7 +24,7 @@ /** * @author godotg */ -public class CsBooleanSerializer implements ICsSerializer { +public class CsBoolSerializer implements ICsSerializer { @Override public void writeObject(StringBuilder builder, String objectStr, int deep, Field field, IFieldRegistration fieldRegistration) { diff --git a/protocol/src/main/java/com/zfoo/protocol/serializer/ecmascript/CodeGenerateEcmaScript.java b/protocol/src/main/java/com/zfoo/protocol/serializer/ecmascript/CodeGenerateEcmaScript.java index 34c017409..0c28c9c34 100644 --- a/protocol/src/main/java/com/zfoo/protocol/serializer/ecmascript/CodeGenerateEcmaScript.java +++ b/protocol/src/main/java/com/zfoo/protocol/serializer/ecmascript/CodeGenerateEcmaScript.java @@ -60,7 +60,7 @@ public void init(GenerateOperation generateOperation) { protocolOutputPath = FileUtils.joinPath(generateOperation.getProtocolPath(), protocolOutputRootPath); FileUtils.deleteFile(new File(protocolOutputPath)); - esSerializerMap.put(BooleanSerializer.INSTANCE, new EsBooleanSerializer()); + esSerializerMap.put(BoolSerializer.INSTANCE, new EsBoolSerializer()); esSerializerMap.put(ByteSerializer.INSTANCE, new EsByteSerializer()); esSerializerMap.put(ShortSerializer.INSTANCE, new EsShortSerializer()); esSerializerMap.put(IntSerializer.INSTANCE, new EsIntSerializer()); diff --git a/protocol/src/main/java/com/zfoo/protocol/serializer/ecmascript/EsBooleanSerializer.java b/protocol/src/main/java/com/zfoo/protocol/serializer/ecmascript/EsBoolSerializer.java similarity index 96% rename from protocol/src/main/java/com/zfoo/protocol/serializer/ecmascript/EsBooleanSerializer.java rename to protocol/src/main/java/com/zfoo/protocol/serializer/ecmascript/EsBoolSerializer.java index eb9d78bda..a8b22606e 100644 --- a/protocol/src/main/java/com/zfoo/protocol/serializer/ecmascript/EsBooleanSerializer.java +++ b/protocol/src/main/java/com/zfoo/protocol/serializer/ecmascript/EsBoolSerializer.java @@ -25,7 +25,7 @@ /** * @author godotg */ -public class EsBooleanSerializer implements IEsSerializer { +public class EsBoolSerializer implements IEsSerializer { @Override public Triple field(Field field, IFieldRegistration fieldRegistration) { return new Triple<>("boolean", field.getName(), "false"); diff --git a/protocol/src/main/java/com/zfoo/protocol/serializer/enhance/EnhanceBooleanSerializer.java b/protocol/src/main/java/com/zfoo/protocol/serializer/enhance/EnhanceBoolSerializer.java similarity index 97% rename from protocol/src/main/java/com/zfoo/protocol/serializer/enhance/EnhanceBooleanSerializer.java rename to protocol/src/main/java/com/zfoo/protocol/serializer/enhance/EnhanceBoolSerializer.java index f41231523..19186f9ea 100644 --- a/protocol/src/main/java/com/zfoo/protocol/serializer/enhance/EnhanceBooleanSerializer.java +++ b/protocol/src/main/java/com/zfoo/protocol/serializer/enhance/EnhanceBoolSerializer.java @@ -23,7 +23,7 @@ /** * @author godotg */ -public class EnhanceBooleanSerializer implements IEnhanceSerializer { +public class EnhanceBoolSerializer implements IEnhanceSerializer { @Override public void writeObject(StringBuilder builder, String objectStr, Field field, IFieldRegistration fieldRegistration) { diff --git a/protocol/src/main/java/com/zfoo/protocol/serializer/gdscript/CodeGenerateGdScript.java b/protocol/src/main/java/com/zfoo/protocol/serializer/gdscript/CodeGenerateGdScript.java index 8a43026e9..d87488c59 100644 --- a/protocol/src/main/java/com/zfoo/protocol/serializer/gdscript/CodeGenerateGdScript.java +++ b/protocol/src/main/java/com/zfoo/protocol/serializer/gdscript/CodeGenerateGdScript.java @@ -65,7 +65,7 @@ public void init(GenerateOperation generateOperation) { protocolOutputPath = FileUtils.joinPath(generateOperation.getProtocolPath(), protocolOutputRootPath); FileUtils.deleteFile(new File(protocolOutputPath)); - gdSerializerMap.put(BooleanSerializer.INSTANCE, new GdBooleanSerializer()); + gdSerializerMap.put(BoolSerializer.INSTANCE, new GdBoolSerializer()); gdSerializerMap.put(ByteSerializer.INSTANCE, new GdByteSerializer()); gdSerializerMap.put(ShortSerializer.INSTANCE, new GdShortSerializer()); gdSerializerMap.put(IntSerializer.INSTANCE, new GdIntSerializer()); diff --git a/protocol/src/main/java/com/zfoo/protocol/serializer/gdscript/GdBooleanSerializer.java b/protocol/src/main/java/com/zfoo/protocol/serializer/gdscript/GdBoolSerializer.java similarity index 96% rename from protocol/src/main/java/com/zfoo/protocol/serializer/gdscript/GdBooleanSerializer.java rename to protocol/src/main/java/com/zfoo/protocol/serializer/gdscript/GdBoolSerializer.java index ae7152f9e..e2ef69e74 100644 --- a/protocol/src/main/java/com/zfoo/protocol/serializer/gdscript/GdBooleanSerializer.java +++ b/protocol/src/main/java/com/zfoo/protocol/serializer/gdscript/GdBoolSerializer.java @@ -25,7 +25,7 @@ /** * @author godotg */ -public class GdBooleanSerializer implements IGdSerializer { +public class GdBoolSerializer implements IGdSerializer { @Override public String fieldType(Field field, IFieldRegistration fieldRegistration) { diff --git a/protocol/src/main/java/com/zfoo/protocol/serializer/golang/CodeGenerateGolang.java b/protocol/src/main/java/com/zfoo/protocol/serializer/golang/CodeGenerateGolang.java index 1f48c7c52..da09deb11 100644 --- a/protocol/src/main/java/com/zfoo/protocol/serializer/golang/CodeGenerateGolang.java +++ b/protocol/src/main/java/com/zfoo/protocol/serializer/golang/CodeGenerateGolang.java @@ -60,7 +60,7 @@ public void init(GenerateOperation generateOperation) { protocolOutputPath = FileUtils.joinPath(generateOperation.getProtocolPath(), protocolOutputRootPath); FileUtils.deleteFile(new File(protocolOutputPath)); - goSerializerMap.put(BooleanSerializer.INSTANCE, new GoBooleanSerializer()); + goSerializerMap.put(BoolSerializer.INSTANCE, new GoBoolSerializer()); goSerializerMap.put(ByteSerializer.INSTANCE, new GoByteSerializer()); goSerializerMap.put(ShortSerializer.INSTANCE, new GoShortSerializer()); goSerializerMap.put(IntSerializer.INSTANCE, new GoIntSerializer()); diff --git a/protocol/src/main/java/com/zfoo/protocol/serializer/golang/GoBooleanSerializer.java b/protocol/src/main/java/com/zfoo/protocol/serializer/golang/GoBoolSerializer.java similarity index 96% rename from protocol/src/main/java/com/zfoo/protocol/serializer/golang/GoBooleanSerializer.java rename to protocol/src/main/java/com/zfoo/protocol/serializer/golang/GoBoolSerializer.java index f1eed1b1e..a65284e5e 100644 --- a/protocol/src/main/java/com/zfoo/protocol/serializer/golang/GoBooleanSerializer.java +++ b/protocol/src/main/java/com/zfoo/protocol/serializer/golang/GoBoolSerializer.java @@ -24,7 +24,7 @@ /** * @author godotg */ -public class GoBooleanSerializer implements IGoSerializer { +public class GoBoolSerializer implements IGoSerializer { @Override public String fieldType(Field field, IFieldRegistration fieldRegistration) { diff --git a/protocol/src/main/java/com/zfoo/protocol/serializer/java/CodeGenerateJava.java b/protocol/src/main/java/com/zfoo/protocol/serializer/java/CodeGenerateJava.java index c8fffd6df..0181f2ecb 100644 --- a/protocol/src/main/java/com/zfoo/protocol/serializer/java/CodeGenerateJava.java +++ b/protocol/src/main/java/com/zfoo/protocol/serializer/java/CodeGenerateJava.java @@ -65,7 +65,7 @@ public void init(GenerateOperation generateOperation) { protocolOutputPath = FileUtils.joinPath(generateOperation.getProtocolPath(), protocolOutputRootPath); FileUtils.deleteFile(new File(protocolOutputPath)); - javaSerializerMap.put(BooleanSerializer.INSTANCE, new JavaBooleanSerializer()); + javaSerializerMap.put(BoolSerializer.INSTANCE, new JavaBoolSerializer()); javaSerializerMap.put(ByteSerializer.INSTANCE, new JavaByteSerializer()); javaSerializerMap.put(ShortSerializer.INSTANCE, new JavaShortSerializer()); javaSerializerMap.put(IntSerializer.INSTANCE, new JavaIntSerializer()); diff --git a/protocol/src/main/java/com/zfoo/protocol/serializer/java/JavaBooleanSerializer.java b/protocol/src/main/java/com/zfoo/protocol/serializer/java/JavaBoolSerializer.java similarity index 96% rename from protocol/src/main/java/com/zfoo/protocol/serializer/java/JavaBooleanSerializer.java rename to protocol/src/main/java/com/zfoo/protocol/serializer/java/JavaBoolSerializer.java index a6d776cfa..faf7a0923 100644 --- a/protocol/src/main/java/com/zfoo/protocol/serializer/java/JavaBooleanSerializer.java +++ b/protocol/src/main/java/com/zfoo/protocol/serializer/java/JavaBoolSerializer.java @@ -24,7 +24,7 @@ /** * @author godotg */ -public class JavaBooleanSerializer implements IJavaSerializer { +public class JavaBoolSerializer implements IJavaSerializer { @Override public void writeObject(StringBuilder builder, String objectStr, int deep, Field field, IFieldRegistration fieldRegistration) { diff --git a/protocol/src/main/java/com/zfoo/protocol/serializer/javascript/CodeGenerateJavaScript.java b/protocol/src/main/java/com/zfoo/protocol/serializer/javascript/CodeGenerateJavaScript.java index 152e5ab53..cd718eb99 100644 --- a/protocol/src/main/java/com/zfoo/protocol/serializer/javascript/CodeGenerateJavaScript.java +++ b/protocol/src/main/java/com/zfoo/protocol/serializer/javascript/CodeGenerateJavaScript.java @@ -59,7 +59,7 @@ public void init(GenerateOperation generateOperation) { protocolOutputPath = FileUtils.joinPath(generateOperation.getProtocolPath(), protocolOutputRootPath); FileUtils.deleteFile(new File(protocolOutputPath)); - jsSerializerMap.put(BooleanSerializer.INSTANCE, new JsBooleanSerializer()); + jsSerializerMap.put(BoolSerializer.INSTANCE, new JsBoolSerializer()); jsSerializerMap.put(ByteSerializer.INSTANCE, new JsByteSerializer()); jsSerializerMap.put(ShortSerializer.INSTANCE, new JsShortSerializer()); jsSerializerMap.put(IntSerializer.INSTANCE, new JsIntSerializer()); diff --git a/protocol/src/main/java/com/zfoo/protocol/serializer/javascript/JsBooleanSerializer.java b/protocol/src/main/java/com/zfoo/protocol/serializer/javascript/JsBoolSerializer.java similarity index 96% rename from protocol/src/main/java/com/zfoo/protocol/serializer/javascript/JsBooleanSerializer.java rename to protocol/src/main/java/com/zfoo/protocol/serializer/javascript/JsBoolSerializer.java index 6822b063f..be8d0cd0f 100644 --- a/protocol/src/main/java/com/zfoo/protocol/serializer/javascript/JsBooleanSerializer.java +++ b/protocol/src/main/java/com/zfoo/protocol/serializer/javascript/JsBoolSerializer.java @@ -25,7 +25,7 @@ /** * @author godotg */ -public class JsBooleanSerializer implements IJsSerializer { +public class JsBoolSerializer implements IJsSerializer { @Override public Triple field(Field field, IFieldRegistration fieldRegistration) { return new Triple<>("boolean", field.getName(), "false"); diff --git a/protocol/src/main/java/com/zfoo/protocol/serializer/kotlin/CodeGenerateKotlin.java b/protocol/src/main/java/com/zfoo/protocol/serializer/kotlin/CodeGenerateKotlin.java index ff41b21f7..e6e6b9e0b 100644 --- a/protocol/src/main/java/com/zfoo/protocol/serializer/kotlin/CodeGenerateKotlin.java +++ b/protocol/src/main/java/com/zfoo/protocol/serializer/kotlin/CodeGenerateKotlin.java @@ -65,7 +65,7 @@ public void init(GenerateOperation generateOperation) { protocolOutputPath = FileUtils.joinPath(generateOperation.getProtocolPath(), protocolOutputRootPath); FileUtils.deleteFile(new File(protocolOutputPath)); - ktSerializerMap.put(BooleanSerializer.INSTANCE, new KtBooleanSerializer()); + ktSerializerMap.put(BoolSerializer.INSTANCE, new KtBoolSerializer()); ktSerializerMap.put(ByteSerializer.INSTANCE, new KtByteSerializer()); ktSerializerMap.put(ShortSerializer.INSTANCE, new KtShortSerializer()); ktSerializerMap.put(IntSerializer.INSTANCE, new KtIntSerializer()); diff --git a/protocol/src/main/java/com/zfoo/protocol/serializer/kotlin/KtBooleanSerializer.java b/protocol/src/main/java/com/zfoo/protocol/serializer/kotlin/KtBoolSerializer.java similarity index 96% rename from protocol/src/main/java/com/zfoo/protocol/serializer/kotlin/KtBooleanSerializer.java rename to protocol/src/main/java/com/zfoo/protocol/serializer/kotlin/KtBoolSerializer.java index be1c0d7bb..bcff25f6d 100644 --- a/protocol/src/main/java/com/zfoo/protocol/serializer/kotlin/KtBooleanSerializer.java +++ b/protocol/src/main/java/com/zfoo/protocol/serializer/kotlin/KtBoolSerializer.java @@ -25,7 +25,7 @@ /** * @author godotg */ -public class KtBooleanSerializer implements IKtSerializer { +public class KtBoolSerializer implements IKtSerializer { @Override public Pair field(Field field, IFieldRegistration fieldRegistration) { diff --git a/protocol/src/main/java/com/zfoo/protocol/serializer/lua/CodeGenerateLua.java b/protocol/src/main/java/com/zfoo/protocol/serializer/lua/CodeGenerateLua.java index 61172f509..f15be9d61 100644 --- a/protocol/src/main/java/com/zfoo/protocol/serializer/lua/CodeGenerateLua.java +++ b/protocol/src/main/java/com/zfoo/protocol/serializer/lua/CodeGenerateLua.java @@ -59,7 +59,7 @@ public void init(GenerateOperation generateOperation) { protocolOutputPath = FileUtils.joinPath(generateOperation.getProtocolPath(), protocolOutputRootPath); FileUtils.deleteFile(new File(protocolOutputPath)); - luaSerializerMap.put(BooleanSerializer.INSTANCE, new LuaBooleanSerializer()); + luaSerializerMap.put(BoolSerializer.INSTANCE, new LuaBoolSerializer()); luaSerializerMap.put(ByteSerializer.INSTANCE, new LuaByteSerializer()); luaSerializerMap.put(ShortSerializer.INSTANCE, new LuaShortSerializer()); luaSerializerMap.put(IntSerializer.INSTANCE, new LuaIntSerializer()); diff --git a/protocol/src/main/java/com/zfoo/protocol/serializer/lua/LuaBooleanSerializer.java b/protocol/src/main/java/com/zfoo/protocol/serializer/lua/LuaBoolSerializer.java similarity index 96% rename from protocol/src/main/java/com/zfoo/protocol/serializer/lua/LuaBooleanSerializer.java rename to protocol/src/main/java/com/zfoo/protocol/serializer/lua/LuaBoolSerializer.java index fb869bc24..fa0f1868f 100644 --- a/protocol/src/main/java/com/zfoo/protocol/serializer/lua/LuaBooleanSerializer.java +++ b/protocol/src/main/java/com/zfoo/protocol/serializer/lua/LuaBoolSerializer.java @@ -25,7 +25,7 @@ /** * @author godotg */ -public class LuaBooleanSerializer implements ILuaSerializer { +public class LuaBoolSerializer implements ILuaSerializer { @Override public String fieldDefaultValue(Field field, IFieldRegistration fieldRegistration) { diff --git a/protocol/src/main/java/com/zfoo/protocol/serializer/php/CodeGeneratePhp.java b/protocol/src/main/java/com/zfoo/protocol/serializer/php/CodeGeneratePhp.java index e2ffefe0e..0716c8088 100644 --- a/protocol/src/main/java/com/zfoo/protocol/serializer/php/CodeGeneratePhp.java +++ b/protocol/src/main/java/com/zfoo/protocol/serializer/php/CodeGeneratePhp.java @@ -60,7 +60,7 @@ public void init(GenerateOperation generateOperation) { protocolOutputPath = FileUtils.joinPath(generateOperation.getProtocolPath(), protocolOutputRootPath); FileUtils.deleteFile(new File(protocolOutputPath)); - phpSerializerMap.put(BooleanSerializer.INSTANCE, new PhpBooleanSerializer()); + phpSerializerMap.put(BoolSerializer.INSTANCE, new PhpBoolSerializer()); phpSerializerMap.put(ByteSerializer.INSTANCE, new PhpByteSerializer()); phpSerializerMap.put(ShortSerializer.INSTANCE, new PhpShortSerializer()); phpSerializerMap.put(IntSerializer.INSTANCE, new PhpIntSerializer()); diff --git a/protocol/src/main/java/com/zfoo/protocol/serializer/php/PhpBooleanSerializer.java b/protocol/src/main/java/com/zfoo/protocol/serializer/php/PhpBoolSerializer.java similarity index 94% rename from protocol/src/main/java/com/zfoo/protocol/serializer/php/PhpBooleanSerializer.java rename to protocol/src/main/java/com/zfoo/protocol/serializer/php/PhpBoolSerializer.java index 310d86d9a..ba26257ea 100644 --- a/protocol/src/main/java/com/zfoo/protocol/serializer/php/PhpBooleanSerializer.java +++ b/protocol/src/main/java/com/zfoo/protocol/serializer/php/PhpBoolSerializer.java @@ -15,7 +15,6 @@ import com.zfoo.protocol.generate.GenerateProtocolFile; import com.zfoo.protocol.model.Pair; -import com.zfoo.protocol.model.Triple; import com.zfoo.protocol.registration.field.IFieldRegistration; import com.zfoo.protocol.util.StringUtils; @@ -26,7 +25,7 @@ /** * @author godotg */ -public class PhpBooleanSerializer implements IPhpSerializer { +public class PhpBoolSerializer implements IPhpSerializer { @Override public Pair field(Field field, IFieldRegistration fieldRegistration) { diff --git a/protocol/src/main/java/com/zfoo/protocol/serializer/python/CodeGeneratePython.java b/protocol/src/main/java/com/zfoo/protocol/serializer/python/CodeGeneratePython.java index 2484f4c20..40e345c40 100644 --- a/protocol/src/main/java/com/zfoo/protocol/serializer/python/CodeGeneratePython.java +++ b/protocol/src/main/java/com/zfoo/protocol/serializer/python/CodeGeneratePython.java @@ -61,7 +61,7 @@ public void init(GenerateOperation generateOperation) { protocolOutputPath = FileUtils.joinPath(generateOperation.getProtocolPath(), protocolOutputRootPath); FileUtils.deleteFile(new File(protocolOutputPath)); - pySerializerMap.put(BooleanSerializer.INSTANCE, new PyBooleanSerializer()); + pySerializerMap.put(BoolSerializer.INSTANCE, new PyBoolSerializer()); pySerializerMap.put(ByteSerializer.INSTANCE, new PyByteSerializer()); pySerializerMap.put(ShortSerializer.INSTANCE, new PyShortSerializer()); pySerializerMap.put(IntSerializer.INSTANCE, new PyIntSerializer()); diff --git a/protocol/src/main/java/com/zfoo/protocol/serializer/python/PyBooleanSerializer.java b/protocol/src/main/java/com/zfoo/protocol/serializer/python/PyBoolSerializer.java similarity index 96% rename from protocol/src/main/java/com/zfoo/protocol/serializer/python/PyBooleanSerializer.java rename to protocol/src/main/java/com/zfoo/protocol/serializer/python/PyBoolSerializer.java index 8e47acca1..91289d15d 100644 --- a/protocol/src/main/java/com/zfoo/protocol/serializer/python/PyBooleanSerializer.java +++ b/protocol/src/main/java/com/zfoo/protocol/serializer/python/PyBoolSerializer.java @@ -24,7 +24,7 @@ /** * @author godotg */ -public class PyBooleanSerializer implements IPySerializer { +public class PyBoolSerializer implements IPySerializer { @Override public String fieldDefaultValue(Field field, IFieldRegistration fieldRegistration) { return "False"; diff --git a/protocol/src/main/java/com/zfoo/protocol/serializer/reflect/BooleanSerializer.java b/protocol/src/main/java/com/zfoo/protocol/serializer/reflect/BoolSerializer.java similarity index 91% rename from protocol/src/main/java/com/zfoo/protocol/serializer/reflect/BooleanSerializer.java rename to protocol/src/main/java/com/zfoo/protocol/serializer/reflect/BoolSerializer.java index 18611f175..2b4adb39b 100644 --- a/protocol/src/main/java/com/zfoo/protocol/serializer/reflect/BooleanSerializer.java +++ b/protocol/src/main/java/com/zfoo/protocol/serializer/reflect/BoolSerializer.java @@ -20,9 +20,9 @@ /** * @author godotg */ -public class BooleanSerializer implements ISerializer { +public class BoolSerializer implements ISerializer { - public static final BooleanSerializer INSTANCE = new BooleanSerializer(); + public static final BoolSerializer INSTANCE = new BoolSerializer(); @Override public void writeObject(ByteBuf buffer, Object object, IFieldRegistration fieldRegistration) { diff --git a/protocol/src/main/java/com/zfoo/protocol/serializer/scala/CodeGenerateScala.java b/protocol/src/main/java/com/zfoo/protocol/serializer/scala/CodeGenerateScala.java index 9731b46d0..f2033c7ca 100644 --- a/protocol/src/main/java/com/zfoo/protocol/serializer/scala/CodeGenerateScala.java +++ b/protocol/src/main/java/com/zfoo/protocol/serializer/scala/CodeGenerateScala.java @@ -65,7 +65,7 @@ public void init(GenerateOperation generateOperation) { protocolOutputPath = FileUtils.joinPath(generateOperation.getProtocolPath(), protocolOutputRootPath); FileUtils.deleteFile(new File(protocolOutputPath)); - scalaSerializerMap.put(BooleanSerializer.INSTANCE, new ScalaBooleanSerializer()); + scalaSerializerMap.put(BoolSerializer.INSTANCE, new ScalaBoolSerializer()); scalaSerializerMap.put(ByteSerializer.INSTANCE, new ScalaByteSerializer()); scalaSerializerMap.put(ShortSerializer.INSTANCE, new ScalaShortSerializer()); scalaSerializerMap.put(IntSerializer.INSTANCE, new ScalaIntSerializer()); diff --git a/protocol/src/main/java/com/zfoo/protocol/serializer/scala/ScalaBooleanSerializer.java b/protocol/src/main/java/com/zfoo/protocol/serializer/scala/ScalaBoolSerializer.java similarity index 96% rename from protocol/src/main/java/com/zfoo/protocol/serializer/scala/ScalaBooleanSerializer.java rename to protocol/src/main/java/com/zfoo/protocol/serializer/scala/ScalaBoolSerializer.java index 84c746c5a..ed74a02c0 100644 --- a/protocol/src/main/java/com/zfoo/protocol/serializer/scala/ScalaBooleanSerializer.java +++ b/protocol/src/main/java/com/zfoo/protocol/serializer/scala/ScalaBoolSerializer.java @@ -25,7 +25,7 @@ /** * @author godotg */ -public class ScalaBooleanSerializer implements IScalaSerializer { +public class ScalaBoolSerializer implements IScalaSerializer { @Override public Pair field(Field field, IFieldRegistration fieldRegistration) { diff --git a/protocol/src/main/java/com/zfoo/protocol/serializer/typescript/CodeGenerateTypeScript.java b/protocol/src/main/java/com/zfoo/protocol/serializer/typescript/CodeGenerateTypeScript.java index b1076180e..9ca17b802 100644 --- a/protocol/src/main/java/com/zfoo/protocol/serializer/typescript/CodeGenerateTypeScript.java +++ b/protocol/src/main/java/com/zfoo/protocol/serializer/typescript/CodeGenerateTypeScript.java @@ -62,7 +62,7 @@ public void init(GenerateOperation generateOperation) { protocolOutputPath = FileUtils.joinPath(generateOperation.getProtocolPath(), protocolOutputRootPath); FileUtils.deleteFile(new File(protocolOutputPath)); - tsSerializerMap.put(BooleanSerializer.INSTANCE, new TsBooleanSerializer()); + tsSerializerMap.put(BoolSerializer.INSTANCE, new TsBoolSerializer()); tsSerializerMap.put(ByteSerializer.INSTANCE, new TsByteSerializer()); tsSerializerMap.put(ShortSerializer.INSTANCE, new TsShortSerializer()); tsSerializerMap.put(IntSerializer.INSTANCE, new TsIntSerializer()); diff --git a/protocol/src/main/java/com/zfoo/protocol/serializer/typescript/TsBooleanSerializer.java b/protocol/src/main/java/com/zfoo/protocol/serializer/typescript/TsBoolSerializer.java similarity index 96% rename from protocol/src/main/java/com/zfoo/protocol/serializer/typescript/TsBooleanSerializer.java rename to protocol/src/main/java/com/zfoo/protocol/serializer/typescript/TsBoolSerializer.java index 094104caf..0f1e67008 100644 --- a/protocol/src/main/java/com/zfoo/protocol/serializer/typescript/TsBooleanSerializer.java +++ b/protocol/src/main/java/com/zfoo/protocol/serializer/typescript/TsBoolSerializer.java @@ -25,7 +25,7 @@ /** * @author godotg */ -public class TsBooleanSerializer implements ITsSerializer { +public class TsBoolSerializer implements ITsSerializer { @Override public Triple field(Field field, IFieldRegistration fieldRegistration) { diff --git a/protocol/src/test/java/com/zfoo/protocol/generate/GenerateTesting.java b/protocol/src/test/java/com/zfoo/protocol/generate/GenerateTesting.java index 4bc44e62c..ecb8eda43 100644 --- a/protocol/src/test/java/com/zfoo/protocol/generate/GenerateTesting.java +++ b/protocol/src/test/java/com/zfoo/protocol/generate/GenerateTesting.java @@ -46,13 +46,14 @@ public void generateAllProtocols() throws IOException { generateLanguages.add(CodeLanguage.EcmaScript); generateLanguages.add(CodeLanguage.TypeScript); generateLanguages.add(CodeLanguage.Lua); + generateLanguages.add(CodeLanguage.Php); generateLanguages.add(CodeLanguage.CSharp); generateLanguages.add(CodeLanguage.GdScript); generateLanguages.add(CodeLanguage.Python); // Initialize and then generate the protocol ProtocolManager.initProtocolAuto(List.of(NormalObject.class, SimpleObject.class, EmptyObject.class), op); - copyFiles(); + // copyFiles(); } @Test