net.sf.morph.util
Class Assert

java.lang.Object
  extended by net.sf.composite.util.Assert
      extended by net.sf.morph.util.Assert

public abstract class Assert
extends net.sf.composite.util.Assert

Assertions built using Morph.

Since:
Apr 18, 2005
Author:
Matt Sgarlata

Nested Class Summary
protected static interface Assert.Validator
           
 
Constructor Summary
Assert()
           
 
Method Summary
protected static void contentsAssertion(Assert.Validator validator, java.lang.Object container, java.lang.String message)
           
static void contentsNotEmpty(java.lang.Object container)
          Throws an exception if any object in the given container is empty, as defined by ObjectUtils.isEmpty(Object).
static void contentsNotNull(java.lang.Object container)
          Throws an exception if any object in the given container is null.
 
Methods inherited from class net.sf.composite.util.Assert
notEmpty, notNull
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

Assert

public Assert()
Method Detail

contentsAssertion

protected static void contentsAssertion(Assert.Validator validator,
                                        java.lang.Object container,
                                        java.lang.String message)

contentsNotNull

public static void contentsNotNull(java.lang.Object container)
Throws an exception if any object in the given container is null.

Parameters:
container - any container for which Morph provides a ContainerReflector
Throws:
java.lang.IllegalArgumentException - if any object in the container is null

contentsNotEmpty

public static void contentsNotEmpty(java.lang.Object container)
Throws an exception if any object in the given container is empty, as defined by ObjectUtils.isEmpty(Object).

Parameters:
container - any container for which Morph provides a ContainerReflector
Throws:
java.lang.IllegalArgumentException - if any object in the container is empty, as defined by ObjectUtils.isEmpty(Object)


Copyright © 2004-2008.