KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > j2me > lang > EnumConstantNotPresentException


1 /*
2  * Javolution - Java(TM) Solution for Real-Time and Embedded Systems
3  * Copyright (C) 2005 - Javolution (http://javolution.org/)
4  * All rights reserved.
5  *
6  * Permission to use, copy, modify, and distribute this software is
7  * freely granted, provided that this notice is preserved.
8  */

9
10 package j2me.lang;
11
12 public class EnumConstantNotPresentException extends RuntimeException JavaDoc {
13     private java.lang.Class JavaDoc _enumType;
14
15     private String JavaDoc _constantName;
16
17     public EnumConstantNotPresentException(java.lang.Class JavaDoc enumType, String JavaDoc constantName) {
18         super(enumType.getName() + "." + constantName);
19         _enumType = enumType;
20         _constantName = constantName;
21     }
22
23     public java.lang.Class JavaDoc enumType() {
24         return _enumType;
25     }
26
27     public String JavaDoc constantName() {
28         return _constantName;
29     }
30 }
Popular Tags