title: How to invoke enum value specific method outside of enum?
body: <p>I have enum like this:</p>
  
  <pre><code>  public enum Email{
          WELCOME,
          LOGIN       
      }
  </code></pre>
  
  <p><code>EmailService</code> has following method signature:</p>
  
  <pre><code>public void sendEmail(String from, String subject, String[] to, Map&lt;String, String&gt; props, String templateFileName)
  </code></pre>
  
  <p>I want to have API like this:</p>
  
  <pre><code>Email.WELCOME.send(from, subject, to, welcomeProp1, welcomeProp2....)
  
  
  
  Email.LOGIN.send(from, subject, to, loginProp1, loginProp2....)
  </code></pre>
  
  <p>To acheve this I tried to add specific methods to enum fields:</p>
  
  <pre><code>public enum Email{
      WELCOME{
          public void send(String param1,String param2,String param3,String param4){
             ....    
          }
      },
      LOGIN{
          public void send(String anotherParam1,String anotherParam2,String anotherParam3){
              .... 
          }
      }
  }
  </code></pre>
  
  <p>But I found out that I could not invoke this methods outside of enum. To acheve it I need to create abstract method and override in each enum value. But problem that signature of these methods are different and it is impossible to do it.</p>
  
  <p>Any ideas?</p>