1 7 8 package java.lang; 9 10 17 public class EnumConstantNotPresentException extends RuntimeException { 18 21 private Class <? extends Enum > enumType; 22 23 26 private String constantName; 27 28 35 public EnumConstantNotPresentException(Class <? extends Enum > enumType, 36 String constantName) { 37 super(enumType.getName() + "." + constantName); 38 this.enumType = enumType; 39 this.constantName = constantName; 40 } 41 42 47 public Class <? extends Enum > enumType() { return enumType; } 48 49 54 public String constantName() { return constantName; } 55 } 56 | Popular Tags |