title: switch over value of enum: case expressions must be constant expressions
body: <p>I have an enum with the following structure:</p>
  
  <pre><code>public enum Friends {
      Peter("Peter von Reus", "Engineer"),
      Ian("Ian de Villiers", "Developer"),
      Sarah("Sarah Roos", "Sandwich-maker");
  
      private String fullName;
      private String occupation;
  
      private Person(String fullName, String occupation) {
          this.fullName = fullName;
          this.occupation = occupation;
      }
  
      public String getFullName() {
          return this.fullName;
      }
  
      public String getOccupation() {
          return this.occupation;
      }
  }
  </code></pre>
  
  <p>I would now like to use <code>switch</code> to determine, if a variable <code>name</code> is associated with a certain <code>enum</code>:</p>
  
  <pre><code>//Get a value from some magical input
  String name = ...
  
  switch (name) {
      case Friends.Peter.getFullName():
          //Do some more magical stuff
          ...
      break;
      case Friends.Ian.getFullName():
          //Do some more magical stuff
          ...
      break;
      case Friends.Sarah.getFullName():
          //Do some more magical stuff
          ...
      break;
  }
  </code></pre>
  
  <p>This seems perfectly legal to me, but I'm getting the error <code>case expressions must be constant expressions</code> in Eclipse. 
  I can get around this with a simple set of if statements but I would like to know the reason for this error and how things might go south if this was allowed.</p>
  
  <p>NOTE: I cannot change the structure of <code>Friends</code></p>