net.sf.appinfo.util
Class AssertUtil

java.lang.Object
  extended by net.sf.appinfo.util.AssertUtil

public final class AssertUtil
extends Object

Utility class with validation checks. Custom class with basic validation for input data created to remove library dependency on Spring.

Since:
0.5.1
Author:
Marcin ZajÄ…czkowski, 2010-11-11

Method Summary
static void notNull(Object objectToCheck, String objectName)
          Checks if passed object is not null (and throws IllegalArgumentException in other cvase).
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Method Detail

notNull

public static void notNull(Object objectToCheck,
                           String objectName)
Checks if passed object is not null (and throws IllegalArgumentException in other cvase). Thrown exception contains proper message with passed object name for easier identification.

Parameters:
objectToCheck - object to be checked
objectName - name of passed object
Throws:
IllegalArgumentException - if passed object is null


Copyright © 2010-2011. All Rights Reserved.