javax.management
Class ReflectionException

java.lang.Object
  extended byjava.lang.Throwable
      extended byjava.lang.Exception
          extended byjavax.management.JMException (src) 
              extended byjavax.management.ReflectionException
All Implemented Interfaces:
java.io.Serializable

public class ReflectionException
extends JMException (src)

Thrown by the MBeanServer when an exception occurs using the java.lang.reflect package to invoke methods on MBeans.

See Also:
Serialized Form

Constructor Summary
ReflectionException(java.lang.Exception e)
          Construct a new ReflectionException from a given exception.
ReflectionException(java.lang.Exception e, java.lang.String message)
          Construct a new ReflectionException from a given exception and message.
 
Method Summary
 java.lang.Throwable getCause()
          Retrieves the wrapped exception.
 java.lang.Exception getTargetException()
          Retrieves the wrapped exception.
 java.lang.String toString()
          Returns a string representation of this exception.
 
Methods inherited from class java.lang.Throwable
fillInStackTrace, getLocalizedMessage, getMessage, getStackTrace, initCause, printStackTrace, printStackTrace, printStackTrace, setStackTrace
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

ReflectionException

public ReflectionException(java.lang.Exception e)
Construct a new ReflectionException from a given exception.

Parameters:
e - the exception to wrap.

ReflectionException

public ReflectionException(java.lang.Exception e,
                           java.lang.String message)
Construct a new ReflectionException from a given exception and message.

Parameters:
e - the exception to wrap.
message - the specified message.
Method Detail

getTargetException

public java.lang.Exception getTargetException()
Retrieves the wrapped exception.

Returns:
the wrapped exception.

getCause

public java.lang.Throwable getCause()
Retrieves the wrapped exception.

Returns:
the wrapped exception.

toString

public java.lang.String toString()
Returns a string representation of this exception. The returned string contains this exception name, message and a string representation of the target exception if it has been set.

Returns:
string representation of this exception