|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.jpu.patterns.common.JPUClassUtils
| Nested Class Summary | |
static class |
JPUClassUtils.IsAssignable
|
| Constructor Summary | |
JPUClassUtils()
|
|
| Method Summary | |
static boolean |
areAnyAssignable(java.util.Collection classesToTest,
java.lang.Class toClass)
|
static void |
rethrowSafely(java.lang.Throwable t,
java.lang.Class[] acceptableTypes)
Rethrows the given Throwable in a manner designed to avoid UndeclaredThrowableException's. |
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
public JPUClassUtils()
| Method Detail |
public static boolean areAnyAssignable(java.util.Collection classesToTest,
java.lang.Class toClass)
public static void rethrowSafely(java.lang.Throwable t,
java.lang.Class[] acceptableTypes)
throws java.lang.Throwable
Throwable in a manner designed to avoid UndeclaredThrowableException's.
If the given Throwable is an Error or RuntimeException, it is simply rethrown. Else its type is checked
for assignment compatibility with the classes given by acceptableTypes. If it is type
compatible, it is rethrown; else it is wrapped in a NestableRuntimeException which is then thrown.
Typically this method would be used for rethrowing exceptions caught inside an invocation handler's invoke()
method.
java.lang.Throwable
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||