title: Java NoSuchMethodError in enum
body: <p>I just added a method to an enum. Whenever I invoke that method I get a NoSuchMethodError:</p>
  
  <pre><code>public enum PHASE {
    PHASE1,
    PHASE2(false),
    PHASE3;
  
    private boolean present = true;
  
    PHASE() {
    }
  
    PHASE(boolean present) {
      this.present = present;
    }
  
    public boolean isPresent() {
      return this.present;
    }
  }
  
  public void foo(PHASE phase) {
    if (phase.isPresent()) {
  ...
  </code></pre>
  
  <p>Here phase.isPresent throws a NoSuchMethodError after clean/build. What am I missing?</p>
  
  <p>--</p>
  
  <p>UPDATE: Netbeans has two cache folders. One was empty, the other one was not. That is my bad, apparently I didn't put enough effort into the caching issue. Unfortunately I cannot downvote my own question...</p>