de.adom.jade.utils
Class ReflectionUtils

java.lang.Object
  extended by de.adom.jade.utils.ReflectionUtils

public class ReflectionUtils
extends java.lang.Object

Defines various tools for reflection support.


Method Summary
static java.lang.Class[] findClasses(java.lang.String pName, java.lang.Class type)
          Retrieves all classes in a given package.
static java.lang.Object instantiate(java.lang.Class clazz)
          Instantiates a given class.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Method Detail

findClasses

public static java.lang.Class[] findClasses(java.lang.String pName,
                                            java.lang.Class type)
Retrieves all classes in a given package.

Parameters:
pName - the name of the package
type - the type of the required objects (may be null if no specific type is required)
Returns:
a list of all class objects that have been found

instantiate

public static java.lang.Object instantiate(java.lang.Class clazz)
Instantiates a given class.

Parameters:
clazz - the class to instantiate
Returns:
the instantiated class