Package org.fest.reflect.util
Class Throwables
- java.lang.Object
-
- org.fest.reflect.util.Throwables
-
public final class Throwables extends java.lang.ObjectUnderstands utility methods related tos.Throwable- Since:
- 1.2
- Author:
- Alex Ruiz
-
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description static java.lang.ThrowabletargetOf(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 theThrowableThrowableis a, this method will return the "target exception" (not the cause.) For otherInvocationTargetExceptionThrowables, the same instance is returned unmodified.- Parameters:
t- the givenThrowable.- Returns:
- the target exception, if applicable. Otherwise, this method returns the same
Throwablepassed as argument.
-
-