title: Java - Get reference to a static class using reflection
body: <p>In Java, is it possible to access an instance of a static class (nested) using reflection?</p>
  
  <p>Supposing I have the following 2 classes defined in the package <strong>Package1.SubPackage.SubSubPackage:</strong></p>
  
  <pre><code>public class MyMainClass {  
     public static class SalesObjectGrouper1 {  
        public static final GrouperContext CONTEXT = new GrouperContext("MyDate");  
     }  
  
     private static class SalesObjectGrouper2 {  
        public static final GrouperContext CONTEXT = new GrouperContext("MyDate");  
     }  
  }  
  </code></pre>
  
  <p>If I run the following code:  </p>
  
  <pre><code>try {
       xyz = Class.forName( "Package1.SubPackage.SubSubPackage.MyMainClass.SalesObjectGrouper1" );
  } catch( ClassNotFoundException ex ) {
       // always hit the error
  }
  </code></pre>
  
  <p>it will error indicating class cannot be found.  Can this be done?</p>