com.cassinidivision.core.cassinijava
Class ClassHelper

java.lang.Object
  extended bycom.cassinidivision.core.cassinijava.ClassHelper

public class ClassHelper
extends Object

Java class-based utilities.


Constructor Summary
ClassHelper()
           
 
Method Summary
static Object instanceofObjectWithClassNamed(String className)
          Create a new instance of the classname specified.
static String nonPackageNameForClass(Class c)
          Obtain the last component of the name of the class (the name of the class without the name of the package attached).
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

ClassHelper

public ClassHelper()
Method Detail

instanceofObjectWithClassNamed

public static Object instanceofObjectWithClassNamed(String className)
Create a new instance of the classname specified.

Essentially equivalent to Class#newInstance but throws RuntimeException instances if problems are encountered.

Parameters:
className - The name of the class.
Returns:
The new object instance created.

nonPackageNameForClass

public static String nonPackageNameForClass(Class c)
Obtain the last component of the name of the class (the name of the class without the name of the package attached).

Parameters:
c - the class.
Returns:
the name of the class without package name.