com.sun.jdmk.defaults
Class Utils
java.lang.Object
com.sun.jdmk.defaults.Utils
- public class Utils
- extends Object
Constructor Summary |
Utils()
|
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Utils
public Utils()
initCause
public static Throwable initCause(Throwable t,
Throwable cause)
- Init the cause field of a Throwable object.
The cause field is set only if t has an
Throwable.initCause(Throwable)
method (JDK Version >= 1.4)
- Parameters:
t
- Throwable on which the cause must be set.cause
- The cause to set on t.
- Returns:
- t with or without the cause field set.
getCause
public static Throwable getCause(Throwable t)
- Returns the cause field of a Throwable object.
The cause field can be got only if t has an
Throwable.getCause()
method (JDK Version >= 1.4)
- Parameters:
t
- Throwable on which the cause must be set.
- Returns:
- the cause if getCause() succeeded and the got value is not
null, otherwise return the t.
Copyright 1998-2004 Sun Microsystems, Inc. All rights reserved. Use is subject to license terms.