Class ValidationUtils

java.lang.Object
com.amazonaws.util.ValidationUtils

public class ValidationUtils extends Object
Useful utilities to validate dependencies
  • Constructor Details

    • ValidationUtils

      public ValidationUtils()
  • Method Details

    • assertNotNull

      public static <T> T assertNotNull(T object, String fieldName) throws IllegalArgumentException
      Asserts that the given object is non-null and returns it.
      Parameters:
      object - Object to assert on
      fieldName - Field name to display in exception message if null
      Returns:
      Object if non null
      Throws:
      IllegalArgumentException - If object was null
    • assertAllAreNull

      public static void assertAllAreNull(String messageIfNull, Object... objects) throws IllegalArgumentException
      Asserts that all of the objects are null.
      Throws:
      IllegalArgumentException - if any object provided was NOT null.