title: Java - enum valueOf "override" naming convention
body: <p>Say you have the following <strong>enum</strong>:</p>
  
  <pre><code>public enum Color {
      RED("R"), GREEN("G"), BLUE("B");
      private String shortName;
  
      private Color(String shortName) {
          this.shortName = shortName;
      }
  
      public static Color getColorByName(String shortName) {
          for (Color color : Color.values()) {
              if (color.shortName.equals(shortName)) {
                  return color;
              }
          }
          throw new IllegalArgumentException("Illegal color name: " + shortName);
      }
  }
  </code></pre>
  
  <p>Since enum is a special case, when you cannot just override the valueOf function, what is the naming convention for circumventing this and implementing valueOf(String name)?</p>
  
  <pre><code>getColorByName(String name)
  getValueOf(String name)
  permissiveValueOf(String name)
  customValueOf(String name)
  forName(String name)
  getEnum(String name)
  getColor(String name)
  </code></pre>
  
  <hr>
  
  <p>Later Edit:
  I see that Bloch in Effective Java 2nd ed. proposes something in the lines of getInstance() (Chapter 1, Item 1).
  Just to add another option.</p>