org.apache.wsif.providers
Class ProviderUtils
java.lang.Object
|
+--org.apache.wsif.providers.ProviderUtils
- public class ProviderUtils
- extends java.lang.Object
A class of static utility methods for use across multiple providers
- Author:
- Owen Burroughs
Method Summary |
static java.lang.Object |
characterArrayToStringArray(java.lang.Object obj)
Convert an array of java.lang.Characters of any dimensions to an equivalent array
of java.lang.Strings which has the same dimensions. |
static java.lang.Object |
charArrayToStringArray(java.lang.Object obj)
Convert an array of chars of any dimensions to an equivalent array
of java.lang.Strings which has the same dimensions. |
static java.lang.Object |
getDefaultObject(java.lang.Class cls)
Returns a default Object value for a given Class. |
static java.lang.Object |
stringArrayToCharacterArray(java.lang.Object obj)
Convert an array of any dimensions containing only Strings of length 1, to an array
of java.lang.Characters which has the same dimensions. |
static java.lang.Object |
stringArrayToCharArray(java.lang.Object obj)
Convert an array of any dimensions containing only Strings of length 1, to an array
of chars which has the same dimensions. |
static java.lang.Character |
stringToCharacter(java.lang.String str)
Convert a String to a Character. |
Methods inherited from class java.lang.Object |
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
ProviderUtils
public ProviderUtils()
stringArrayToCharacterArray
public static java.lang.Object stringArrayToCharacterArray(java.lang.Object obj)
throws WSIFException
- Convert an array of any dimensions containing only Strings of length 1, to an array
of java.lang.Characters which has the same dimensions.
- Parameters:
obj
- The array of Strings- Returns:
- The Character array
- Throws:
A
- WSIFException thrown if the conversion fails for any reason.
stringArrayToCharArray
public static java.lang.Object stringArrayToCharArray(java.lang.Object obj)
throws WSIFException
- Convert an array of any dimensions containing only Strings of length 1, to an array
of chars which has the same dimensions.
- Parameters:
obj
- The array of Strings- Returns:
- The char array
- Throws:
A
- WSIFException thrown if the conversion fails for any reason.
characterArrayToStringArray
public static java.lang.Object characterArrayToStringArray(java.lang.Object obj)
throws WSIFException
- Convert an array of java.lang.Characters of any dimensions to an equivalent array
of java.lang.Strings which has the same dimensions.
- Parameters:
obj
- The array of Characters- Returns:
- The array of Strings
- Throws:
A
- WSIFException thrown if the conversion fails for any reason.
charArrayToStringArray
public static java.lang.Object charArrayToStringArray(java.lang.Object obj)
throws WSIFException
- Convert an array of chars of any dimensions to an equivalent array
of java.lang.Strings which has the same dimensions.
- Parameters:
obj
- The array of chars- Returns:
- The array of Strings
- Throws:
A
- WSIFException thrown if the conversion fails for any reason.
stringToCharacter
public static java.lang.Character stringToCharacter(java.lang.String str)
- Convert a String to a Character. If the String is longer than one character
this method will return null;
- Parameters:
str
- The String- Returns:
- The Character or null if the String was longer than one character
getDefaultObject
public static java.lang.Object getDefaultObject(java.lang.Class cls)
- Returns a default Object value for a given Class. If the Class is a primitive type
the method will return the default value for that primitive type wrapped up in its
object form. For example, invoking the method with int.class will return a new
java.lang.Integer with an int value of 0. If the Class does not represent a
primitive type then null will be returned.
- Parameters:
cls
- The Class- Returns:
- The default object value
Copyright © 2002, 2002 Apache XML Project. All Rights Reserved.