OSDN Git Service

Add exception messages and javadocs
[mikumikustudio/libgdx-mikumikustudio.git] / gdx / src / com / badlogic / gdx / utils / reflect / Constructor.java
index 68196fc..1f34bc3 100644 (file)
@@ -3,6 +3,9 @@ package com.badlogic.gdx.utils.reflect;
 
 import java.lang.reflect.InvocationTargetException;
 
+/** Provides information about, and access to, a single constructor for a Class.
+ * @author nexsoftware
+ */
 public final class Constructor {
 
        private final java.lang.reflect.Constructor constructor;
@@ -11,10 +14,12 @@ public final class Constructor {
                this.constructor = constructor;
        }
 
+       /** Returns an array of Class objects that represent the formal parameter types, in declaration order, of the constructor. */
        public Class[] getParameterTypes () {
                return constructor.getParameterTypes();
        }
 
+       /** Returns the Class object representing the class or interface that declares the constructor. */
        public Class getDeclaringClass () {
                return constructor.getDeclaringClass();
        }
@@ -27,6 +32,7 @@ public final class Constructor {
                constructor.setAccessible(accessible);
        }
 
+       /** Uses the constructor to create and initialize a new instance of the constructor's declaring class, with the supplied initialization parameters. */
        public Object newInstance (Object... args) throws ReflectionException {
                try {
                        return constructor.newInstance(args);