title: How to call Enum individual methods?
body: <p>I have an enum that might look like the one below. My goal is to have an <code>enum</code> with some common methods (I enforced this by adding an abstract method) and some "enum value individual" methods.</p>
  
  <p>The following code compiles:</p>
  
  <pre><code>public enum MyEnum {
  
      VALUE {
          @Override
          public void syso() {
              System.out.println("VALUE syso");
          }
      },
  
      SPECIAL_VALUE {
          @Override
          public void syso() {
              System.out.println("SPECIAL_VALUE syso");
          }
  
          public void sayHello() {
              System.out.println("Hello");
          }
      };
  
      public abstract void syso();
  
      public static void main(String... args) {
          MyEnum.VALUE.syso();
          MyEnum.SPECIAL_VALUE.syso();
      }
  
  }
  </code></pre>
  
  <p>Running this results in the following being printed:</p>
  
  <pre><code>VALUE syso
  SPECIAL_VALUE syso
  </code></pre>
  
  <p>However trying to call <code>sayHello()</code>, which I defined in <code>SPECIAL_VALUE</code>, does not work.</p>
  
  <p>Adding the following to the main method, does not compile anymore:</p>
  
  <pre><code>public static void main(String... args) {
      MyEnum.SPECIAL_VALUE.sayHello(); // does not work
  }
  </code></pre>
  
  <p>Why is that? It seems perfectly fine to me, but the method cannot be found. Is there any way to invoke this method? Maybe via reflection?</p>
  
  <p>I would like to avoid making this method abstract as well, because it does not make sense for any other enum values. I also cannot <code>extend</code> this enum and add this special method, while inheriting the common ones. I would also like to avoid adding some kind of singleton class to "simulate" this.</p>
  
  <p>Is it anyhow possible to run this? If not, what would be my best alternative?</p>