org.apache.jetspeed.util
Class ArgUtil

java.lang.Object
  extended by org.apache.jetspeed.util.ArgUtil

public final class ArgUtil
extends Object

ArgUtil

Misc. utilities for rudimentary argument validation

Version:
$Id: ArgUtil.java 516448 2007-03-09 16:25:47Z ate $
Author:
Scott T. Weaver

Field Summary
private static String MSG_1
           
private static String MSG_2
           
 
Constructor Summary
ArgUtil()
           
 
Method Summary
static void assertNotNull(Class nonNullClass, Object nonNullObject, Object thisObject)
           notNull
static void assertNotNull(Class nonNullClass, Object nonNullObject, Object thisObject, String methodName)
           
static void assertPropertyNotNull(Object nonNullObject, Object thisObject, String methodName, String property)
           
static void notNull(Object[] args, String[] argNames, String methodName)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

MSG_1

private static final String MSG_1
See Also:
Constant Field Values

MSG_2

private static final String MSG_2
See Also:
Constant Field Values
Constructor Detail

ArgUtil

public ArgUtil()
Method Detail

notNull

public static void notNull(Object[] args,
                           String[] argNames,
                           String methodName)
Parameters:
args - array of arguments to validate as not nul
argNames - array of arguments names, idexes should match with args.
methodName - Name of method we are validating arguments for.
Throws:
IllegalArgumentException - If ANY of the arguments are null

assertNotNull

public static final void assertNotNull(Class nonNullClass,
                                       Object nonNullObject,
                                       Object thisObject)
                                throws IllegalArgumentException

notNull

Parameters:
nonNullObject -
thisObject -
Throws:
IllegalArgumentException

assertNotNull

public static final void assertNotNull(Class nonNullClass,
                                       Object nonNullObject,
                                       Object thisObject,
                                       String methodName)
                                throws IllegalArgumentException
Throws:
IllegalArgumentException

assertPropertyNotNull

public static final void assertPropertyNotNull(Object nonNullObject,
                                               Object thisObject,
                                               String methodName,
                                               String property)
                                        throws IllegalArgumentException
Throws:
IllegalArgumentException


Copyright © 1999-2007 Apache Software Foundation. All Rights Reserved.