title: Java: Dealing with a lot of identical named classes in very long packages
body: <p>Following problem: A lot of <strong>generated</strong> Java classes that look like this:</p>
  <pre><code>com.company.project.lib.messages.version1.Message1;
  com.company.project.lib.messages.version2.Message1;
  com.company.project.lib.messages.version3.Message1;
  com.company.project.lib.messages.version4.Message1;
  com.company.project.lib.messages.version5.Message1;
  </code></pre>
  <p>...</p>
  <p>Each of these Message1 classes has a lot of nested subclasses or constants, e.g.</p>
  <pre><code>com.company.project.lib.messages.version1.Message1.VERSION.VERSION_A_WITH_CHANGE_1;
  com.company.project.lib.messages.version1.Message1.VERSION.VERSION_B;
  com.company.project.lib.messages.version1.Message1.Group1.SubGroupA.Format.MESSAGEFORMAT_1;
  com.company.project.lib.messages.version1.Message1.Group1.SubGroupA.Format.MESSAGEFORMAT_2;
  </code></pre>
  <p>...</p>
  <p>The nesting becomes even deeper (up to 10 levels).
  How do I deal with this? The code quickly becomes unreadable, because comparing to an enum value stretches over multiple lines...</p>
  <p>Any ideas?</p>