allensoft.util
Class MiscUtilities

java.lang.Object
  |
  +--allensoft.util.MiscUtilities

public class MiscUtilities
extends java.lang.Object


Constructor Summary
MiscUtilities()
           
 
Method Summary
static java.lang.String getResourceString(java.util.ResourceBundle bundle, java.lang.Object object, java.lang.Class baseClass, java.lang.String sSubKey)
          Gets a resource string from a ResourceBundle for the supplied object.
static java.lang.String getShortClassName(java.lang.Class clazz)
           
static java.lang.String getShortClassName(java.lang.String className)
          Gets the shortened class name given the fully qualified class name.
static void printEnvironment()
          Prints information about the current environment to stdout.
static void printEnvironment(java.io.PrintStream out)
          Prints information about the current environment to the supplied PrintWriter.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

MiscUtilities

public MiscUtilities()
Method Detail

printEnvironment

public static void printEnvironment(java.io.PrintStream out)
Prints information about the current environment to the supplied PrintWriter.

printEnvironment

public static void printEnvironment()
Prints information about the current environment to stdout.

getShortClassName

public static java.lang.String getShortClassName(java.lang.String className)
Gets the shortened class name given the fully qualified class name. e.g. getShortClassName ("java.lang.Thread") returns "Thread".

getShortClassName

public static java.lang.String getShortClassName(java.lang.Class clazz)

getResourceString

public static java.lang.String getResourceString(java.util.ResourceBundle bundle,
                                                 java.lang.Object object,
                                                 java.lang.Class baseClass,
                                                 java.lang.String sSubKey)
Gets a resource string from a ResourceBundle for the supplied object. This is done by looking for a string with the key classname.sSubKey, where classname is the class name of object. If a string is found under this key it is returned, otherwise the process is repeated for the super class. If it gets to the suplied baseClass and it still hasn't found a string value it throws a MissingResourceException. This allows for the easy overriding of resource strings without overriding any methods in the base classes.