01: /* JFox, the OpenSource J2EE Application Server
02: *
03: * Copyright (C) 2002 huihoo.org
04: * Distributable under GNU LGPL license
05: * See the GNU Lesser General Public License for more details.
06: */
07:
08: package javax.management;
09:
10: /**
11: * Represents exceptions thrown in the MBean server when using the
12: * java.lang.reflect classes to invoke methods on MBeans. It "wraps" the
13: * actual java.lang.Exception thrown.
14: *
15: * @author <a href="mailto:young_yy@hotmail.org">Young Yang</a>
16: */
17:
18: public class ReflectionException extends JMException {
19:
20: /**
21: * The wrapped Exception
22: */
23: private java.lang.Exception exception;
24:
25: /**
26: * Creates a <CODE>ReflectionException</CODE> that wraps the actual <CODE>java.lang.Exception</CODE>.
27: */
28: public ReflectionException(java.lang.Exception e) {
29: super ();
30: exception = e;
31: }
32:
33: /**
34: * Creates a <CODE>ReflectionException</CODE> that wraps the actual <CODE>java.lang.Exception</CODE> with
35: * a detail message.
36: */
37: public ReflectionException(java.lang.Exception e, String message) {
38: super (message);
39: exception = e;
40: }
41:
42: /**
43: * Returns the actual <CODE>java.lang.Exception</CODE> thrown.
44: */
45: public java.lang.Exception getTargetException() {
46: return exception;
47: }
48:
49: }
|