org.apache.axis.utils
Class JavaUtils
java.lang.Object
|
+--org.apache.axis.utils.JavaUtils
- public class JavaUtils
- extends java.lang.Object
Utility class to deal with Java language related issues, such
as type conversions.
- Author:
- Glen Daniels (gdaniels@macromedia.com)
Method Summary |
static java.lang.Object |
convert(java.lang.Object arg,
java.lang.Class destClass)
Utility function to convert an Object to some desired Class. |
static java.lang.String |
getMessage(java.lang.String key)
Get the message with the given key. |
static java.lang.String |
getMessage(java.lang.String key,
java.lang.String var)
Get the message with the given key. |
static java.lang.String |
getMessage(java.lang.String key,
java.lang.String[] vars)
Get the message with the given key. |
static java.lang.String |
getMessage(java.lang.String key,
java.lang.String var1,
java.lang.String var2)
Get the message with the given key. |
static java.util.ResourceBundle |
getMessageResourceBundle()
Get the resource bundle that contains all of the AXIS translatable messages. |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
JavaUtils
public JavaUtils()
convert
public static java.lang.Object convert(java.lang.Object arg,
java.lang.Class destClass)
- Utility function to convert an Object to some desired Class.
Right now this only works for arrays <-> Lists, but it might be
expanded into a more general form later.
- Parameters:
arg
- the array to convertdestClass
- the actual class we want
getMessageResourceBundle
public static java.util.ResourceBundle getMessageResourceBundle()
- Get the resource bundle that contains all of the AXIS translatable messages.
getMessage
public static java.lang.String getMessage(java.lang.String key)
throws java.util.MissingResourceException
- Get the message with the given key. There are no arguments for this message.
getMessage
public static java.lang.String getMessage(java.lang.String key,
java.lang.String var)
throws java.util.MissingResourceException
- Get the message with the given key. If an argument is specified in the message (in the
format of "{0}") then fill in that argument with the value of var.
getMessage
public static java.lang.String getMessage(java.lang.String key,
java.lang.String var1,
java.lang.String var2)
throws java.util.MissingResourceException
- Get the message with the given key. If arguments are specified in the message (in the
format of "{0} {1}") then fill them in with the values of var1 and var2, respectively.
getMessage
public static java.lang.String getMessage(java.lang.String key,
java.lang.String[] vars)
throws java.util.MissingResourceException
- Get the message with the given key. Replace each "{X}" in the message with vars[X]. If
there are more vars than {X}'s, then the extra vars are ignored. If there are more {X}'s
than vars, then a java.text.ParseException (subclass of RuntimeException) is thrown.
Copyright © 2001 Apache XML Project. All Rights Reserved.