EnumConstantNotPresentException


EnumConstantNotPresentException java.lang

Java 5.0 serializable unchecked

This unchecked exception is thrown when Java code attempts to use an enum constant that no longer exists. This can happen only if the enumerated constant was removed from its enumerated type after the referencing code was compiled. The methods of the exception provide the Class of the enumerated type and the name of the nonexistent constant.

Figure 10-19. java.lang.EnumConstantNotPresentException

 public class  EnumConstantNotPresentException  extends RuntimeException {  // Public Constructors  public  EnumConstantNotPresentException  (Class<? extends Enum>  enumType  ,       String  constantName  );  // Public Instance Methods  public String  constantName  ( );        public Class<? extends Enum>  enumType  ( );   } 



Java In A Nutshell
Java In A Nutshell, 5th Edition
ISBN: 0596007736
EAN: 2147483647
Year: 2004
Pages: 1220

flylib.com © 2008-2017.
If you may any questions please contact us: flylib@qtcs.net