net.kano.joscar
Class MiscTools

java.lang.Object
  extended bynet.kano.joscar.MiscTools

public final class MiscTools
extends java.lang.Object

Provides a set of miscellaneous tools used throughout joscar.


Method Summary
static java.lang.String getClassName(java.lang.Class cl)
          Returns the name of the given class, with the package name stripped off.
static java.lang.String getClassName(java.lang.Object obj)
          Returns the class name of the given object, with the package name stripped off.
static java.lang.String getClassName(java.lang.String fullName)
          Returns the class name of the given fully qualified class name.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Method Detail

getClassName

public static java.lang.String getClassName(java.lang.Object obj)
Returns the class name of the given object, with the package name stripped off. There must be a better way to do this.

Parameters:
obj - the object whose class name will be returned
Returns:
the class name of the given object, without package name

getClassName

public static java.lang.String getClassName(java.lang.Class cl)
Returns the name of the given class, with the package name stripped off.

Parameters:
cl - the class whose name will be returned
Returns:
the name of the given class, without package name

getClassName

public static java.lang.String getClassName(java.lang.String fullName)
Returns the class name of the given fully qualified class name. For example, getClassName("net.kano.joscar.MiscTools") would produce the string "MiscTools".

Parameters:
fullName - the fully qualified class name
Returns:
the given fully qualified class name, without the package name