I have to create an Adapter between two software (mech. simulation, non-cs). Assuming we have a class named ThatThing
. I have to handle various vendor specific implementations. These versions don't have meaningful names (unlike eclipse helios, indigo etc.).
1. How should I name a class that should express version number?
I find class like ThatThing_3_6_Impl
, ThatThing_3_7_Impl
quite awkward.
Best Answer
Use a different package name.
This allows you to keep all the "things" for specific versions together.
Apache Commons Lang used this format when releasing their "version 3" rewrites.
Since you need to be able to reference both version in a single class, I would shorten the names to:
In your case, this seems to be descriptive enough, and it removes the ugly
Impl
and_
's.