Class ReflectionUtil
- java.lang.Object
-
- com.github.toolarium.enumeration.configuration.util.ReflectionUtil
-
public final class ReflectionUtil extends java.lang.ObjectDefines the reflection utility.
-
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description voiddisableAccessWarnings()Disable access warningsstatic ReflectionUtilgetInstance()Get the instance<T> TnewInstance(java.lang.Class<T> clazz)Create a new instance of a given class
-
-
-
Method Detail
-
getInstance
public static ReflectionUtil getInstance()
Get the instance- Returns:
- the instance
-
newInstance
public <T> T newInstance(java.lang.Class<T> clazz) throws java.lang.SecurityException, java.lang.InstantiationException, java.lang.IllegalAccessExceptionCreate a new instance of a given class- Type Parameters:
T- the generic type- Parameters:
clazz- the class- Returns:
- the instance
- Throws:
java.lang.SecurityException- in case of errorjava.lang.reflect.InvocationTargetException- in case of errorjava.lang.IllegalArgumentException- in case of errorjava.lang.IllegalAccessException- in case of errorjava.lang.InstantiationException- in case of error
-
disableAccessWarnings
public void disableAccessWarnings()
Disable access warnings
-
-