Package com.badlogic.gdx.utils.reflect
Class Constructor
- java.lang.Object
-
- com.badlogic.gdx.utils.reflect.Constructor
-
public final class Constructor extends java.lang.ObjectProvides information about, and access to, a single constructor for a Class.
-
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description java.lang.ClassgetDeclaringClass()Returns the Class object representing the class or interface that declares the constructor.java.lang.Class[]getParameterTypes()Returns an array of Class objects that represent the formal parameter types, in declaration order, of the constructor.booleanisAccessible()java.lang.ObjectnewInstance(java.lang.Object... args)Uses the constructor to create and initialize a new instance of the constructor's declaring class, with the supplied initialization parameters.voidsetAccessible(boolean accessible)
-
-
-
Method Detail
-
getParameterTypes
public java.lang.Class[] getParameterTypes()
Returns an array of Class objects that represent the formal parameter types, in declaration order, of the constructor.
-
getDeclaringClass
public java.lang.Class getDeclaringClass()
Returns the Class object representing the class or interface that declares the constructor.
-
isAccessible
public boolean isAccessible()
-
setAccessible
public void setAccessible(boolean accessible)
-
newInstance
public java.lang.Object newInstance(java.lang.Object... args) throws ReflectionExceptionUses the constructor to create and initialize a new instance of the constructor's declaring class, with the supplied initialization parameters.- Throws:
ReflectionException
-
-