Class Checks

java.lang.Object
com.evolveum.midpoint.util.Checks

public class Checks extends Object
  • Method Details

    • checkSchema

      public static void checkSchema(boolean test, String template, Object... info) throws SchemaException
      Throws SchemaException if test failed.
      Parameters:
      test - test
      template - String template for formatting arguments see Strings.lenientFormat(String, Object...) for formatting.
      info - Arguments for exception message
      Throws:
      SchemaException - Throws exception with formatted string if test is false
    • checkSchemaNotNull

      @NonNull public static <T> T checkSchemaNotNull(T obj, String template, Object... info) throws SchemaException
      Type Parameters:
      T - Class of object
      Parameters:
      obj - object to be tested for null
      template - String template for formatting arguments see Strings.lenientFormat(String, Object...) for formatting.
      info - Arguments for exception message
      Returns:
      Object if not null
      Throws:
      SchemaException