Package com.illumon.iris.validation
Class IrisValidationUtils
java.lang.Object
com.illumon.iris.validation.IrisValidationUtils
Utility functions for help in validation classes
-
Nested Class Summary
Nested Classes -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionstatic <T> TinvokeAndVerify(IrisValidationUtils.ThrowingSupplier<T> supplier) Invoke a supplier that may throw exceptions.
-
Constructor Details
-
IrisValidationUtils
public IrisValidationUtils()
-
-
Method Details
-
invokeAndVerify
public static <T> T invokeAndVerify(IrisValidationUtils.ThrowingSupplier<T> supplier) throws NoSuchMethodException, InvocationTargetException, IllegalAccessException, InstantiationException Invoke a supplier that may throw exceptions. If an InvocationTargetException occurs, see if it's validation-related, and if so rethrow the cause.- Type Parameters:
T- the returned type- Parameters:
supplier- the supplier- Returns:
- the supplied value
- Throws:
NoSuchMethodException- from the supplierInvocationTargetException- from the supplierIllegalAccessException- from the supplierInstantiationException- from the supplier
-