In my github repo I have hierarchy of classes and of course serialization/deserialization mechanism is present for them.
I serializing them manually via Externalizable and I want to take all of the code that generates values, needed for instance serialization out of this classes to keep all simple and flexible (or just to take out this mess)
So what I basically want to do is to create SerializationHelper
s and DeserializationHelper
s classes, where the name of particular class will be NameOfClassSerializationHelper
.
Names like this are 29 characters in worst case, but I think that this is too much. Yeah of course it provides better understanding of what's going on and the name is less then 50 chars and user will never see this classes.
Here is scatch of interface hierarchy for those helper classes.
So as you can see I reduced Serialization
to Ser
and Deserialization
to Deser
but seems like it hurts readabuility.
For example class that implements TrieSerializationHelper
will have name LinkedTrieSerializationHelper
.
There is one another trouble: I can't place those serialization/deserialization helpers to another package because they use some package-private class (Node
, as you can see from restoreRooot
method of WordGraphDeserHelper
).
So I'm totally confused how to do better and exactly what I have to do. Thanks in advance.