title: Alias Classes in Java
body: <p>I have a series of auto generated classes that result in the same class name. The solution to this was to separate the classes into different packages. When creating functions in another class that uses multiple auto generated classes my code results in something like the following to avoid class and package collision issues. </p>
  
  <pre><code>... Other methods with similar functionality that reference a 
          different auto generated class.    
  
  //////////////////////////////////////////////////////////////////////////////
  public FutureTask&lt;com.CompanyName.ProductName.SDK.Device.
  GetCommandsResponse.ObjectClass&gt; SendLogEntryEventAsync(final 
          com.CompanyName.ProductName.SDK.Device.GetCommandsRequest 
          request)
  {
      FutureTask&lt;com.CompanyName.ProductName.SDK.Device.GetCommandsResponse.
      ObjectClass&gt; futureTask;
  
      Callable&lt;com.CompanyName.ProductName.SDK.Device.GetCommandsResponse.
      ObjectClass&gt; call = new Callable&lt;com.CompanyName.ProductName.SDK.Device.
      GetCommandsResponse.ObjectClass&gt;()
      {
          public com.CompanyName.ProductName.SDK.Device.GetCommandsResponse.
      ObjectClass call() throws ResponseException
          {
              return SendGetCommandRequest(request);
          }
      };
  
      futureTask = new FutureTask&lt;com.CompanyName.ProductName.SDK.Device.
              GetCommandsResponse.ObjectClass&gt;(call);
  
      return futureTask;
  }
  
  ////////////////////////////////////////////////////////////////////////
  ... More methods with similar functionality that reference a 
          different auto generated class.    
  
  ///////////////////////////////////////////////////////////////////////////////
  </code></pre>
  
  <p>This is not a problem for me as a programmer, as I don't mind typing out the packages when casting or declaring types. </p>
  
  <p>What concerns me is, that because this code is intended to be part of an SDK and will be distributed to third party developers, these long class names will become irritating; and at worst developers will refuse to use the SDK due to hassle. </p>
  
  <p>Is it possible to create wrapper classes that alias these auto-generated classes, so the names are unique, easy to understand, caste, and declare?</p>
  
  <p>If so how would I do this?  </p>