Example usage for Java java.lang.reflect Constructor fields, constructors, methods, implement or subclass
The text is from its open source code.
boolean | equals(Object obj) Compares this Constructor against the specified object. |
T | getAnnotation(Class |
Annotation[] | getAnnotations() |
Class> | getClass() Returns the runtime class of this Object . |
Annotation[] | getDeclaredAnnotations() |
Class | getDeclaringClass() Returns the Class object representing the class that declares the constructor represented by this object. |
Class>[] | getExceptionTypes() |
Type[] | getGenericExceptionTypes() |
Type[] | getGenericParameterTypes() |
int | getModifiers() |
String | getName() Returns the name of this constructor, as a string. |
Annotation[][] | getParameterAnnotations() |
int | getParameterCount() |
Parameter[] | getParameters() Returns an array of Parameter objects that represent all the parameters to the underlying executable represented by this object. |
Class>[] | getParameterTypes() |
TypeVariable | getTypeParameters() |
int | hashCode() Returns a hashcode for this Constructor . |
boolean | isAccessible() Get the value of the accessible flag for this reflected object. |
boolean | isAnnotationPresent(Class extends Annotation> annotationClass) |
boolean | isSynthetic() |
boolean | isVarArgs() |
T | newInstance(Object... initargs) Uses the constructor represented by this Constructor object to create and initialize a new instance of the constructor's declaring class, with the specified initialization parameters. |
void | setAccessible(boolean flag) A SecurityException is also thrown if this object is a Constructor object for the class Class and flag is true. |
String | toGenericString() Returns a string describing this Constructor , including type parameters. |
String | toString() Returns a string describing this Constructor . |