public final class ReflectionUtils extends Object
Modifier and Type | Method and Description |
---|---|
static Object |
createObjectFromClass(Class clazz)
Creates a new instance of the given class.
|
static Object |
createObjectFromClass(String clazz)
Creates a new instance of the given class.
|
static Class[] |
getClasses(String packageName,
Class baseClass)
Scans all classes accessible from the context class loader which
belong to the given package and subpackages.
|
public static Object createObjectFromClass(String clazz)
clazz
- The class name of the class to be created.null
if the creation failed.public static Object createObjectFromClass(Class clazz)
clazz
- The class name of the class to be created.null
if the creation failed.public static Class[] getClasses(String packageName, Class baseClass)
packageName
- The base packagebaseClass
- The base class of all classes or null
if the
classes can be of any type.Copyright © 2012 Thomas Hillebrandt. All Rights Reserved.