com.amx.duet.tools.lang
Class ClassName

java.lang.Object
  extended bycom.amx.duet.tools.lang.ClassName

public class ClassName
extends java.lang.Object

Utility class for parsing out the class name for a given class.

Version:
1.0.0

Constructor Summary
ClassName()
           
 
Method Summary
static java.lang.String getClassName(java.lang.Class cls)
          Gets the class name for the Class passed in using java's Class reflection
static java.lang.String getClassName(java.lang.Object rStr)
          Gets the class name for the Object passed in using java's Class reflection
static java.lang.String getClassName(java.lang.String name)
          Parses a dot delimited String for the last separated element in the string.
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

ClassName

public ClassName()
Method Detail

getClassName

public static final java.lang.String getClassName(java.lang.Object rStr)
Gets the class name for the Object passed in using java's Class reflection

Parameters:
rStr - Object whose name is to be retrieved
Returns:
String containing only the Class name without the package details

getClassName

public static final java.lang.String getClassName(java.lang.Class cls)
Gets the class name for the Class passed in using java's Class reflection

Parameters:
cls - Class whose name is to be retrieved
Returns:
String containing only the Class name without the package details

getClassName

public static final java.lang.String getClassName(java.lang.String name)
Parses a dot delimited String for the last separated element in the string. In this case we are trying to retrieve the Class name from it's entire package name

Parameters:
name - dot delimited String containing the name to be retrieved
Returns:
The last String in a dot separated string


Copyright © 2008 AMX LLC. All Rights Reserved.