From d080fff5d3c8ea05fb3a2fb9d7f5212f4b066364 Mon Sep 17 00:00:00 2001 From: Yannik Bretschneider Date: Mon, 31 May 2021 23:38:22 +0200 Subject: [PATCH] refactor: arranged de/serializers into packages --- .../uulm/teamname/marvelous/gamelibrary/IntVector2.java | 4 ++-- .../teamname/marvelous/gamelibrary/entities/Entity.java | 2 +- .../teamname/marvelous/gamelibrary/entities/EntityID.java | 2 +- .../uulm/teamname/marvelous/gamelibrary/events/Event.java | 2 +- .../json/ingame/{ => deserialize}/EntityDeserializer.java | 2 +- .../json/ingame/{ => deserialize}/EntityIDDeserializer.java | 2 +- .../json/ingame/{ => deserialize}/EventDeserializer.java | 2 +- .../ingame/{ => deserialize}/IntVector2Deserializer.java | 2 +- .../json/ingame/{ => deserialize}/RequestDeserializer.java | 2 +- .../json/ingame/{ => serialize}/IntVector2Serializer.java | 2 +- .../json/ingame/{ => serialize}/RequestSerializer.java | 2 +- .../teamname/marvelous/gamelibrary/requests/Request.java | 6 ++---- 12 files changed, 14 insertions(+), 16 deletions(-) rename src/main/java/uulm/teamname/marvelous/gamelibrary/json/ingame/{ => deserialize}/EntityDeserializer.java (97%) rename src/main/java/uulm/teamname/marvelous/gamelibrary/json/ingame/{ => deserialize}/EntityIDDeserializer.java (92%) rename src/main/java/uulm/teamname/marvelous/gamelibrary/json/ingame/{ => deserialize}/EventDeserializer.java (98%) rename src/main/java/uulm/teamname/marvelous/gamelibrary/json/ingame/{ => deserialize}/IntVector2Deserializer.java (91%) rename src/main/java/uulm/teamname/marvelous/gamelibrary/json/ingame/{ => deserialize}/RequestDeserializer.java (97%) rename src/main/java/uulm/teamname/marvelous/gamelibrary/json/ingame/{ => serialize}/IntVector2Serializer.java (91%) rename src/main/java/uulm/teamname/marvelous/gamelibrary/json/ingame/{ => serialize}/RequestSerializer.java (97%) diff --git a/src/main/java/uulm/teamname/marvelous/gamelibrary/IntVector2.java b/src/main/java/uulm/teamname/marvelous/gamelibrary/IntVector2.java index ef4b951..f409a48 100644 --- a/src/main/java/uulm/teamname/marvelous/gamelibrary/IntVector2.java +++ b/src/main/java/uulm/teamname/marvelous/gamelibrary/IntVector2.java @@ -2,8 +2,8 @@ package uulm.teamname.marvelous.gamelibrary; import com.fasterxml.jackson.databind.annotation.JsonDeserialize; import com.fasterxml.jackson.databind.annotation.JsonSerialize; -import uulm.teamname.marvelous.gamelibrary.json.ingame.IntVector2Deserializer; -import uulm.teamname.marvelous.gamelibrary.json.ingame.IntVector2Serializer; +import uulm.teamname.marvelous.gamelibrary.json.ingame.deserialize.IntVector2Deserializer; +import uulm.teamname.marvelous.gamelibrary.json.ingame.serialize.IntVector2Serializer; import java.io.Serializable; import java.util.Objects; diff --git a/src/main/java/uulm/teamname/marvelous/gamelibrary/entities/Entity.java b/src/main/java/uulm/teamname/marvelous/gamelibrary/entities/Entity.java index 8e15a41..256a8a0 100644 --- a/src/main/java/uulm/teamname/marvelous/gamelibrary/entities/Entity.java +++ b/src/main/java/uulm/teamname/marvelous/gamelibrary/entities/Entity.java @@ -2,7 +2,7 @@ package uulm.teamname.marvelous.gamelibrary.entities; import com.fasterxml.jackson.databind.annotation.JsonDeserialize; import uulm.teamname.marvelous.gamelibrary.IntVector2; -import uulm.teamname.marvelous.gamelibrary.json.ingame.EntityDeserializer; +import uulm.teamname.marvelous.gamelibrary.json.ingame.deserialize.EntityDeserializer; import java.util.Objects; diff --git a/src/main/java/uulm/teamname/marvelous/gamelibrary/entities/EntityID.java b/src/main/java/uulm/teamname/marvelous/gamelibrary/entities/EntityID.java index af7465b..aaf5864 100644 --- a/src/main/java/uulm/teamname/marvelous/gamelibrary/entities/EntityID.java +++ b/src/main/java/uulm/teamname/marvelous/gamelibrary/entities/EntityID.java @@ -3,7 +3,7 @@ package uulm.teamname.marvelous.gamelibrary.entities; import com.fasterxml.jackson.annotation.JsonProperty; import com.fasterxml.jackson.annotation.JsonPropertyOrder; import com.fasterxml.jackson.databind.annotation.JsonDeserialize; -import uulm.teamname.marvelous.gamelibrary.json.ingame.EntityIDDeserializer; +import uulm.teamname.marvelous.gamelibrary.json.ingame.deserialize.EntityIDDeserializer; import java.util.Objects; diff --git a/src/main/java/uulm/teamname/marvelous/gamelibrary/events/Event.java b/src/main/java/uulm/teamname/marvelous/gamelibrary/events/Event.java index 14f0b74..97e151e 100644 --- a/src/main/java/uulm/teamname/marvelous/gamelibrary/events/Event.java +++ b/src/main/java/uulm/teamname/marvelous/gamelibrary/events/Event.java @@ -1,7 +1,7 @@ package uulm.teamname.marvelous.gamelibrary.events; import com.fasterxml.jackson.databind.annotation.JsonDeserialize; -import uulm.teamname.marvelous.gamelibrary.json.ingame.EventDeserializer; +import uulm.teamname.marvelous.gamelibrary.json.ingame.deserialize.EventDeserializer; import uulm.teamname.marvelous.gamelibrary.json.basic.EventMessage; import java.util.Objects; diff --git a/src/main/java/uulm/teamname/marvelous/gamelibrary/json/ingame/EntityDeserializer.java b/src/main/java/uulm/teamname/marvelous/gamelibrary/json/ingame/deserialize/EntityDeserializer.java similarity index 97% rename from src/main/java/uulm/teamname/marvelous/gamelibrary/json/ingame/EntityDeserializer.java rename to src/main/java/uulm/teamname/marvelous/gamelibrary/json/ingame/deserialize/EntityDeserializer.java index 1262960..88efb62 100644 --- a/src/main/java/uulm/teamname/marvelous/gamelibrary/json/ingame/EntityDeserializer.java +++ b/src/main/java/uulm/teamname/marvelous/gamelibrary/json/ingame/deserialize/EntityDeserializer.java @@ -1,4 +1,4 @@ -package uulm.teamname.marvelous.gamelibrary.json.ingame; +package uulm.teamname.marvelous.gamelibrary.json.ingame.deserialize; import com.fasterxml.jackson.core.JsonParser; import com.fasterxml.jackson.core.JsonProcessingException; diff --git a/src/main/java/uulm/teamname/marvelous/gamelibrary/json/ingame/EntityIDDeserializer.java b/src/main/java/uulm/teamname/marvelous/gamelibrary/json/ingame/deserialize/EntityIDDeserializer.java similarity index 92% rename from src/main/java/uulm/teamname/marvelous/gamelibrary/json/ingame/EntityIDDeserializer.java rename to src/main/java/uulm/teamname/marvelous/gamelibrary/json/ingame/deserialize/EntityIDDeserializer.java index 5eb805f..c694d0a 100644 --- a/src/main/java/uulm/teamname/marvelous/gamelibrary/json/ingame/EntityIDDeserializer.java +++ b/src/main/java/uulm/teamname/marvelous/gamelibrary/json/ingame/deserialize/EntityIDDeserializer.java @@ -1,4 +1,4 @@ -package uulm.teamname.marvelous.gamelibrary.json.ingame; +package uulm.teamname.marvelous.gamelibrary.json.ingame.deserialize; import com.fasterxml.jackson.core.JsonParser; import com.fasterxml.jackson.core.JsonProcessingException; diff --git a/src/main/java/uulm/teamname/marvelous/gamelibrary/json/ingame/EventDeserializer.java b/src/main/java/uulm/teamname/marvelous/gamelibrary/json/ingame/deserialize/EventDeserializer.java similarity index 98% rename from src/main/java/uulm/teamname/marvelous/gamelibrary/json/ingame/EventDeserializer.java rename to src/main/java/uulm/teamname/marvelous/gamelibrary/json/ingame/deserialize/EventDeserializer.java index 6af5183..ae8f6f5 100644 --- a/src/main/java/uulm/teamname/marvelous/gamelibrary/json/ingame/EventDeserializer.java +++ b/src/main/java/uulm/teamname/marvelous/gamelibrary/json/ingame/deserialize/EventDeserializer.java @@ -1,4 +1,4 @@ -package uulm.teamname.marvelous.gamelibrary.json.ingame; +package uulm.teamname.marvelous.gamelibrary.json.ingame.deserialize; import com.fasterxml.jackson.core.JsonParser; import com.fasterxml.jackson.core.ObjectCodec; diff --git a/src/main/java/uulm/teamname/marvelous/gamelibrary/json/ingame/IntVector2Deserializer.java b/src/main/java/uulm/teamname/marvelous/gamelibrary/json/ingame/deserialize/IntVector2Deserializer.java similarity index 91% rename from src/main/java/uulm/teamname/marvelous/gamelibrary/json/ingame/IntVector2Deserializer.java rename to src/main/java/uulm/teamname/marvelous/gamelibrary/json/ingame/deserialize/IntVector2Deserializer.java index cf35971..03d1756 100644 --- a/src/main/java/uulm/teamname/marvelous/gamelibrary/json/ingame/IntVector2Deserializer.java +++ b/src/main/java/uulm/teamname/marvelous/gamelibrary/json/ingame/deserialize/IntVector2Deserializer.java @@ -1,4 +1,4 @@ -package uulm.teamname.marvelous.gamelibrary.json.ingame; +package uulm.teamname.marvelous.gamelibrary.json.ingame.deserialize; import com.fasterxml.jackson.core.JsonParser; import com.fasterxml.jackson.core.JsonProcessingException; diff --git a/src/main/java/uulm/teamname/marvelous/gamelibrary/json/ingame/RequestDeserializer.java b/src/main/java/uulm/teamname/marvelous/gamelibrary/json/ingame/deserialize/RequestDeserializer.java similarity index 97% rename from src/main/java/uulm/teamname/marvelous/gamelibrary/json/ingame/RequestDeserializer.java rename to src/main/java/uulm/teamname/marvelous/gamelibrary/json/ingame/deserialize/RequestDeserializer.java index 5696e33..3ff87d3 100644 --- a/src/main/java/uulm/teamname/marvelous/gamelibrary/json/ingame/RequestDeserializer.java +++ b/src/main/java/uulm/teamname/marvelous/gamelibrary/json/ingame/deserialize/RequestDeserializer.java @@ -1,4 +1,4 @@ -package uulm.teamname.marvelous.gamelibrary.json.ingame; +package uulm.teamname.marvelous.gamelibrary.json.ingame.deserialize; import com.fasterxml.jackson.core.JsonParser; import com.fasterxml.jackson.core.JsonProcessingException; diff --git a/src/main/java/uulm/teamname/marvelous/gamelibrary/json/ingame/IntVector2Serializer.java b/src/main/java/uulm/teamname/marvelous/gamelibrary/json/ingame/serialize/IntVector2Serializer.java similarity index 91% rename from src/main/java/uulm/teamname/marvelous/gamelibrary/json/ingame/IntVector2Serializer.java rename to src/main/java/uulm/teamname/marvelous/gamelibrary/json/ingame/serialize/IntVector2Serializer.java index 9d02f60..3dde2b3 100644 --- a/src/main/java/uulm/teamname/marvelous/gamelibrary/json/ingame/IntVector2Serializer.java +++ b/src/main/java/uulm/teamname/marvelous/gamelibrary/json/ingame/serialize/IntVector2Serializer.java @@ -1,4 +1,4 @@ -package uulm.teamname.marvelous.gamelibrary.json.ingame; +package uulm.teamname.marvelous.gamelibrary.json.ingame.serialize; import com.fasterxml.jackson.core.JsonGenerator; import com.fasterxml.jackson.databind.SerializerProvider; diff --git a/src/main/java/uulm/teamname/marvelous/gamelibrary/json/ingame/RequestSerializer.java b/src/main/java/uulm/teamname/marvelous/gamelibrary/json/ingame/serialize/RequestSerializer.java similarity index 97% rename from src/main/java/uulm/teamname/marvelous/gamelibrary/json/ingame/RequestSerializer.java rename to src/main/java/uulm/teamname/marvelous/gamelibrary/json/ingame/serialize/RequestSerializer.java index 04dd8ff..7e20c53 100644 --- a/src/main/java/uulm/teamname/marvelous/gamelibrary/json/ingame/RequestSerializer.java +++ b/src/main/java/uulm/teamname/marvelous/gamelibrary/json/ingame/serialize/RequestSerializer.java @@ -1,4 +1,4 @@ -package uulm.teamname.marvelous.gamelibrary.json.ingame; +package uulm.teamname.marvelous.gamelibrary.json.ingame.serialize; import com.fasterxml.jackson.core.JsonGenerator; import com.fasterxml.jackson.databind.SerializerProvider; diff --git a/src/main/java/uulm/teamname/marvelous/gamelibrary/requests/Request.java b/src/main/java/uulm/teamname/marvelous/gamelibrary/requests/Request.java index 136e5ac..642240e 100644 --- a/src/main/java/uulm/teamname/marvelous/gamelibrary/requests/Request.java +++ b/src/main/java/uulm/teamname/marvelous/gamelibrary/requests/Request.java @@ -1,13 +1,11 @@ package uulm.teamname.marvelous.gamelibrary.requests; -import com.fasterxml.jackson.annotation.JsonAlias; -import com.fasterxml.jackson.annotation.JsonKey; import com.fasterxml.jackson.annotation.JsonProperty; import com.fasterxml.jackson.databind.annotation.JsonDeserialize; import com.fasterxml.jackson.databind.annotation.JsonSerialize; import uulm.teamname.marvelous.gamelibrary.json.basic.EventMessage; -import uulm.teamname.marvelous.gamelibrary.json.ingame.RequestDeserializer; -import uulm.teamname.marvelous.gamelibrary.json.ingame.RequestSerializer; +import uulm.teamname.marvelous.gamelibrary.json.ingame.deserialize.RequestDeserializer; +import uulm.teamname.marvelous.gamelibrary.json.ingame.serialize.RequestSerializer; import java.util.Objects;