Package com.illumon.iris.validation
Class IrisValidationUtils
java.lang.Object
com.illumon.iris.validation.IrisValidationUtils
public class IrisValidationUtils extends Object
Utility functions for help in validation classes
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static interfaceIrisValidationUtils.ThrowingSupplier<T> -
Constructor Summary
Constructors Constructor Description IrisValidationUtils() -
Method Summary
Modifier and Type Method Description static <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, InstantiationExceptionInvoke 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
-