title: The static field should be accessed in a static way
body: <p>I have different Exception category Enum as below</p>
  
  <pre><code>public enum GSBBCacheCategory  {
      SEARCH(9001),
      UPDATE_PERSECURITY(9002),
      CROSS_REFERENCING_PERSECURITY(9003),
      METADATA_SEARCH(9004),
      REMOVEALL(9005),
      UPDATE_BACKOFFICE(9002);
  
      private int exceptionCode;
  
      GSBBCacheCategory(int exceptionCode)
      {
          this.exceptionCode = exceptionCode;
      }
  
      public int getExceptionCode()
      {
          return exceptionCode;
      }
  } 
  
  public enum GSBBEncryptionCategory  {
  .
  .
  .
  }
  </code></pre>
  
  <p>I want to provide one place to access these Enum in client code.  Presently I achieved this as below</p>
  
  <pre><code>public class GSBBExceptionCodes
  {
   public static GSBBDecryptionCategory decryptionCategory;
   public static GSBBCacheCategory cacheCategory;
  }
  </code></pre>
  
  <p>Now to access exception code I have do something like below </p>
  
  <pre><code>public static void main(String[] args) {
       System.out.println(GSBBExceptionCodes.decryptionCategory.ERRORCODE_DECRYPTION_FAILURE);
       System.out.println(GSBBExceptionCodes.cacheCategory.UPDATE_PERSECURITY);
  }
  </code></pre>
  
  <p>Which says “<strong>The static field GSBBDecryptionCategory.ERRORCODE_DECRYPTION_FAILURE should be accessed in a static way</strong>”</p>
  
  <p>Is it possible to achieve above without any warning?</p>