Class FuturesGetChecked
java.lang.Object
com.google.common.util.concurrent.FuturesGetChecked
Static methods used to implement
Futures.getChecked(Future, Class).-
Nested Class Summary
Nested ClassesModifier and TypeClassDescription(package private) static interface(package private) static classProvides a check of whether an exception type is valid for use withgetChecked(Future, Class), possibly using caching. -
Field Summary
Fields -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionprivate static FuturesGetChecked.GetCheckedTypeValidator(package private) static voidcheckExceptionClassValidity(Class<? extends Exception> exceptionClass) (package private) static FuturesGetChecked.GetCheckedTypeValidator(package private) static <V,X extends Exception>
VgetChecked(FuturesGetChecked.GetCheckedTypeValidator validator, Future<V> future, Class<X> exceptionClass) Implementation ofFutures.getChecked(Future, Class).(package private) static <V,X extends Exception>
VgetChecked(Future<V> future, Class<X> exceptionClass) (package private) static <V,X extends Exception>
VgetChecked(Future<V> future, Class<X> exceptionClass, long timeout, TimeUnit unit) Implementation ofFutures.getChecked(Future, Class, long, TimeUnit).private static booleanhasConstructorUsableByGetChecked(Class<? extends Exception> exceptionClass) (package private) static booleanisCheckedException(Class<? extends Exception> type) private static <X> XnewFromConstructor(Constructor<X> constructor, Throwable cause) private static <X extends Exception>
XnewWithCause(Class<X> exceptionClass, Throwable cause) private static <X extends Exception>
List<Constructor<X>> preferringStringsThenThrowables(List<Constructor<X>> constructors) (package private) static FuturesGetChecked.GetCheckedTypeValidatorprivate static <X extends Exception>
voidwrapAndThrowExceptionOrError(Throwable cause, Class<X> exceptionClass)
-
Field Details
-
ORDERING_BY_CONSTRUCTOR_PARAMETER_LIST
-
WITH_STRING_PARAM_THEN_WITH_THROWABLE_PARAM
-
-
Constructor Details
-
FuturesGetChecked
private FuturesGetChecked()
-
-
Method Details
-
getChecked
- Throws:
X
-
getChecked
static <V,X extends Exception> V getChecked(FuturesGetChecked.GetCheckedTypeValidator validator, Future<V> future, Class<X> exceptionClass) throws X Implementation ofFutures.getChecked(Future, Class).- Throws:
X
-
getChecked
static <V,X extends Exception> V getChecked(Future<V> future, Class<X> exceptionClass, long timeout, TimeUnit unit) throws X Implementation ofFutures.getChecked(Future, Class, long, TimeUnit).- Throws:
X
-
bestGetCheckedTypeValidator
-
weakSetValidator
-
classValueValidator
-
wrapAndThrowExceptionOrError
private static <X extends Exception> void wrapAndThrowExceptionOrError(Throwable cause, Class<X> exceptionClass) throws X - Throws:
X
-
hasConstructorUsableByGetChecked
-
newWithCause
-
preferringStringsThenThrowables
private static <X extends Exception> List<Constructor<X>> preferringStringsThenThrowables(List<Constructor<X>> constructors) -
newFromConstructor
-
isCheckedException
-
checkExceptionClassValidity
-