|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.dbmaintain.util.ReflectionUtils
public class ReflectionUtils
Utility methods that use reflection for instance creation or class inspection.
| Constructor Summary | |
|---|---|
ReflectionUtils()
|
|
| Method Summary | ||
|---|---|---|
static
|
createInstanceOfType(Class<T> type,
boolean bypassAccessibility,
Class<?>[] parameterTypes,
Object[] parameters)
Creates an instance of the given type |
|
static
|
createInstanceOfType(String className,
boolean bypassAccessibility)
Creates an instance of the class with the given name. |
|
static
|
getClassWithName(String className)
Gets the class for the given name. |
|
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public ReflectionUtils()
| Method Detail |
|---|
public static <T> T createInstanceOfType(String className,
boolean bypassAccessibility)
className - The name of the class, not nullbypassAccessibility - If true, no exception is thrown if the parameterless constructor is not public
DbMaintainException - if the class could not be found or no instance could be created
public static <T> T createInstanceOfType(Class<T> type,
boolean bypassAccessibility,
Class<?>[] parameterTypes,
Object[] parameters)
T - The type of the instancetype - The type of the instancebypassAccessibility - If true, no exception is thrown if the parameterless constructor is not publicparameterTypes - Types of the constructor argumentsparameters - Constructor arguments
DbMaintainException - If an instance could not be createdpublic static <T> Class<T> getClassWithName(String className)
className - The name of the class, not null
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||