org.jclouds.util
Class Throwables2

java.lang.Object
  extended by org.jclouds.util.Throwables2

public class Throwables2
extends Object

General utilities used in jclouds code.

Author:
Adrian Cole

Constructor Summary
Throwables2()
           
 
Method Summary
static
<T extends Throwable>
com.google.common.base.Predicate<Throwable>
containsThrowable(Class<T> throwableType)
           
static
<T extends Throwable>
T
getFirstThrowableOfType(Throwable from, Class<T> clazz)
           
static
<T> T
propagateAuthorizationOrOriginalException(Exception e)
           
static void propagateIfPossible(Throwable exception, Iterable<com.google.common.reflect.TypeToken<? extends Throwable>> throwables)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

Throwables2

public Throwables2()
Method Detail

containsThrowable

public static <T extends Throwable> com.google.common.base.Predicate<Throwable> containsThrowable(Class<T> throwableType)

getFirstThrowableOfType

public static <T extends Throwable> T getFirstThrowableOfType(Throwable from,
                                                              Class<T> clazz)

propagateAuthorizationOrOriginalException

public static <T> T propagateAuthorizationOrOriginalException(Exception e)

propagateIfPossible

public static void propagateIfPossible(Throwable exception,
                                       Iterable<com.google.common.reflect.TypeToken<? extends Throwable>> throwables)
                                throws Throwable
Throws:
Throwable


Copyright © 2009-2013 jclouds. All Rights Reserved.