title: Annotate class with inner class
body: <p>I create my <strong>enums</strong> through <strong>reflection</strong>, for that I add to each enum an inner class which implements the <strong>abstract factory</strong>. Now I want to access this inner class in order to invoke the method:</p>
  
  <pre><code>@Factory(FooFactory.class)
  public enum Foo {
  
       FOO, BAR;
  
       public class FooFactory implements AbstractFactory&lt;Foo&gt; {
  
            public Foo create(String value) {
                 return valueOf(value.toUpperCase());
            }
       }
  }
  </code></pre>
  
  <p>The definition of <code>@Factory</code> is:</p>
  
  <pre><code>@Retention(RetentionPolicy.RUNTIME)
  public @interface Factory {
  
          Class&lt;?&gt; value();
  }
  </code></pre>
  
  <p>With this, however, I receive the following <strong>error</strong>:</p>
  
  <blockquote>
    <p>Class cannot be resolved to a type FooFactory.java</p>
  </blockquote>
  
  <p>When I try <code>@Factory(Foo$FooFactory.class)</code> I receive the <strong>error</strong>:</p>
  
  <blockquote>
    <p>The nested Foo$FooFactory cannot be referneced using its binary name.</p>
  </blockquote>
  
  <p>So is it even possible to reference a nested class?</p>