javax.management
Class ReflectionException

java.lang.Object
  |
  +--java.lang.Throwable
        |
        +--java.lang.Exception
              |
              +--javax.management.JMException
                    |
                    +--javax.management.ReflectionException

public class ReflectionException
extends JMException

This class represents exceptions thrown in the MBeanServer when using the java.lang.reflect classes to invoke methods on MBeans. It "wraps" the actual java.lang.Exception thrown.

See Also:
Serialized Form

Constructor Summary
ReflectionException(java.lang.Exception ex)
          Creates a ReflectionException that wraps the actual java.lang.Exception.
ReflectionException(java.lang.Exception ex, java.lang.String msg)
          Creates a ReflectionException that wraps the actual java.lang.Exception with a detail message.
 
Method Summary
 java.lang.Throwable getCause()
          Returns the actual Exception thrown.
 java.lang.Exception getTargetException()
          Returns the actual Exception thrown.
 void printStackTrace()
          Overrides the printStackTrace method of Throwable
 java.lang.String toString()
          Overrides the toString method of Exception
 
Methods inherited from class java.lang.Throwable
fillInStackTrace, getLocalizedMessage, getMessage, printStackTrace, printStackTrace
 
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 ex)
Creates a ReflectionException that wraps the actual java.lang.Exception.
Parameters:
ex - Exception to be wraped by ReflectionException

ReflectionException

public ReflectionException(java.lang.Exception ex,
                           java.lang.String msg)
Creates a ReflectionException that wraps the actual java.lang.Exception with a detail message.
Parameters:
ex - Exception to be wraped by ReflectionException
msg - Detail message
Method Detail

getTargetException

public java.lang.Exception getTargetException()
Returns the actual Exception thrown.
Returns:
the wrapped Exception.

getCause

public java.lang.Throwable getCause()
Returns the actual Exception thrown.
Returns:
the wrapped Exception.

printStackTrace

public void printStackTrace()
Overrides the printStackTrace method of Throwable
Overrides:
printStackTrace in class java.lang.Throwable

toString

public java.lang.String toString()
Overrides the toString method of Exception
Overrides:
toString in class java.lang.Throwable