public class Util
extends java.lang.Object
Modifier and Type | Method and Description |
---|---|
static java.lang.String |
ckInvalidStrParam(java.lang.String paramName,
java.lang.String param)
Verifies that the given
String parameter is not null ,
is not an empty String and is not a String containing only spaces. |
static void |
ckNullObjParam(java.lang.String paramName,
java.lang.Object param)
Verifies that the given object parameter is not
null . |
static void |
ckNullOrInvalidArrayParam(java.lang.String paramName,
java.lang.Object[] param)
Verifies that the given object array parameter is neither
null
nor empty and contains no null members. |
static void |
ckNullOrInvalidCollectionParam(java.lang.String paramName,
java.util.Collection<? extends java.lang.Object> param)
Verifies that the given collection parameter is neither
null
nor empty and contains no null members. |
static void |
dbgOutput(java.lang.String msgPattern,
java.lang.Object... params)
FOR DEVELOPMENT USE ONLY!
|
static java.io.PrintStream |
getDbgOutputStream()
FOR DEVELOPMENT USE ONLY!
|
public static void ckNullObjParam(java.lang.String paramName, java.lang.Object param)
null
.paramName
- The String
name of the parameter for error reporting purposes.param
- The parameter in question.E_NULL_OR_EMPTY_INPUT_PARAM
- if param
is null
.public static void ckNullOrInvalidArrayParam(java.lang.String paramName, java.lang.Object[] param)
null
nor empty and contains no null
members.paramName
- The String
name of the parameter for error reporting purposes.param
- The array parameter in question.E_NULL_OR_INVALID_ARRAY_PARAM
- if param
array is null
, empty, contains a null
member.public static void ckNullOrInvalidCollectionParam(java.lang.String paramName, java.util.Collection<? extends java.lang.Object> param)
null
nor empty and contains no null
members.paramName
- The String
name of the parameter for error reporting purposes.param
- The collection parameter in question.E_NULL_OR_INVALID_COLLECTION_PARAM
- if param
collection is null
, empty, or contains a null
member.public static java.lang.String ckInvalidStrParam(java.lang.String paramName, java.lang.String param)
String
parameter is not null
,
is not an empty String
and is not a String
containing only spaces.paramName
- The String
name of the parameter for error reporting purposes.param
- The String
parameter in question.String.Trim()
version of param
.E_NULL_OR_EMPTY_INPUT_PARAM
- if param
is null
, empty, or contains only spaces.public static void dbgOutput(java.lang.String msgPattern, java.lang.Object... params)
Helper method to output a debug message primarily for test failure problems in RTC Build environment.
msgPattern
- a pattern string for MessageFormat.params
- optional pattern replacement parameters.public static java.io.PrintStream getDbgOutputStream()
Used to acquire a PrintStream instance for debugging test failures in the RTC build environment. Expects there to be either a "D:/Temp" or "C:/Temp" directory in which a "JARM_DBG" sub-directory can be created (if necessary). Whenever the first request for the PrintStream is made, a "dbgInfo_{TS}.txt" file is created in this directory and a PrintStream returned for it.
null
if one cannot be acquired.© Copyright IBM Corp. 2010, 2013. All Rights Reserved.