KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > org > hibernate > InstantiationException


1 //$Id: InstantiationException.java,v 1.3 2005/05/14 17:27:56 oneovthafew Exp $
2
package org.hibernate;
3
4 /**
5  * Thrown if Hibernate can't instantiate an entity or component
6  * class at runtime.
7  *
8  * @author Gavin King
9  */

10
11 public class InstantiationException extends HibernateException {
12
13     private final Class JavaDoc clazz;
14
15     public InstantiationException(String JavaDoc s, Class JavaDoc clazz, Throwable JavaDoc root) {
16         super(s, root);
17         this.clazz = clazz;
18     }
19
20     public InstantiationException(String JavaDoc s, Class JavaDoc clazz) {
21         super(s);
22         this.clazz = clazz;
23     }
24
25     public InstantiationException(String JavaDoc s, Class JavaDoc clazz, Exception JavaDoc e) {
26         super(s, e);
27         this.clazz = clazz;
28     }
29
30     public Class JavaDoc getPersistentClass() {
31         return clazz;
32     }
33
34     public String JavaDoc getMessage() {
35         return super.getMessage() + clazz.getName();
36     }
37
38 }
39
40
41
42
43
44
45
Popular Tags