Package org.fest.reflect.util
Class Throwables
- java.lang.Object
-
- org.fest.reflect.util.Throwables
-
public final class Throwables extends java.lang.Object
Understands utility methods related to
s.Throwable
- Since:
- 1.2
- Author:
- Alex Ruiz
-
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description static java.lang.Throwable
targetOf(java.lang.Throwable t)
Obtains the target of the given
.Throwable
-
-
-
Method Detail
-
targetOf
public static java.lang.Throwable targetOf(java.lang.Throwable t)
Obtains the target of the given
. If theThrowable
Throwable
is a
, this method will return the "target exception" (not the cause.) For otherInvocationTargetException
Throwable
s, the same instance is returned unmodified.- Parameters:
t
- the givenThrowable
.- Returns:
- the target exception, if applicable. Otherwise, this method returns the same
Throwable
passed as argument.
-
-