org.apache.jetspeed.util
Class ArgUtil
java.lang.Object
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
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 |
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
ArgUtil
public ArgUtil()
notNull
public static void notNull(Object[] args,
String[] argNames,
String methodName)
- Parameters:
args
- array of arguments to validate as not nulargNames
- 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.