|
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectjava.lang.reflect.AccessibleObject
java.lang.reflect.Constructor<T>
public final class Constructor<T>
Constructor enables reflection access to Java constructors.
| Field Summary |
|---|
| Fields inherited from interface java.lang.reflect.Member |
|---|
DECLARED, PUBLIC |
| Method Summary | ||
|---|---|---|
boolean |
equals(Object obj)
equals compares two constructors. |
|
|
getAnnotation(Class<T> annotationClass)
Returns this element's annotation for the specified type if such an annotation is present, else null. |
|
Annotation[] |
getDeclaredAnnotations()
Returns all annotations that are directly present on this element. |
|
Class<T> |
getDeclaringClass()
getDeclaringClass returns the class this constructor was declared in. |
|
Class<?>[] |
getExceptionTypes()
getExceptionTypes returns an array of all declared exceptions of this constructor. |
|
Type[] |
getGenericExceptionTypes()
getGenericExceptionTypes NYI: COMMENT: JDK 1.5 method description |
|
Type[] |
getGenericParameterTypes()
getGenericParameterTypes NYI: COMMENT: JDK 1.5 method description |
|
int |
getModifiers()
getModifiers returns the set of modifiers set for this constructor. |
|
String |
getName()
getName returns the name of this constructor. |
|
Annotation[][] |
getParameterAnnotations()
Returns an array of arrays that represent the annotations on the formal parameters, in declaration order, of the method represented by this Constructor object. |
|
Class<?>[] |
getParameterTypes()
getParameterTypes returns an array with the type of all the parameters of this constructor. |
|
TypeVariable<Constructor<T>>[] |
getTypeParameters()
getTypeParameters NYI: COMMENT: JDK 1.5 method description |
|
int |
hashCode()
hashCode returns a hash code for this constructor. |
|
boolean |
isSynthetic()
isSynthetic NYI: COMMENT: JDK 1.5 method description |
|
boolean |
isVarArgs()
isVarArgs NYI: COMMENT: JDK 1.5 method description |
|
T |
newInstance(Object... initargs)
newInstance creates a new instance of this constructor's declaring class and executed this constructors. |
|
String |
toGenericString()
toGenericString NYI: COMMENT: JDK 1.5 method description |
|
String |
toString()
toString conversts this constructor to a string such as "public java.lang.Integer(int)" |
|
| Methods inherited from class java.lang.reflect.AccessibleObject |
|---|
getAnnotations, isAccessible, isAnnotationPresent, setAccessible, setAccessible |
| Methods inherited from class java.lang.Object |
|---|
clone, finalize, getClass, notify, notifyAll, wait, wait, wait |
| Methods inherited from interface java.lang.reflect.AnnotatedElement |
|---|
getAnnotations, isAnnotationPresent |
| Method Detail |
|---|
public Class<T> getDeclaringClass()
getDeclaringClass in interface MemberMember.getDeclaringClass()public int getModifiers()
getModifiers in interface MemberModifierpublic Class<?>[] getParameterTypes()
public String getName()
getName in interface Memberpublic Class<?>[] getExceptionTypes()
public boolean equals(Object obj)
equals in class Objectobj - another constructor
public int hashCode()
hashCode in class Objectpublic String toString()
toString in class Object
public T newInstance(Object... initargs)
throws InstantiationException,
IllegalAccessException,
IllegalArgumentException,
InvocationTargetException
initargs - the arguments to be passed to this
constructor. This may be null if getParameterTypes().length==0.
InstantiationException - if the declaring class is
abstract.
IllegalAccessException - if the caller is not permitted to
call this construcctor.
IllegalArgumentException - if initargs are not compatible
to this constructor's arguments lists.
InvocationTargetException - if execution of the constructor
resulted in an exception.
ExceptionInInitializerError - if intialization of the
declaring class or any other class whose initialization was
triggered by initializing the declaring class or by execution of
this constructor failed.public TypeVariable<Constructor<T>>[] getTypeParameters()
NYI: COMMENT: JDK 1.5 method description
getTypeParameters in interface GenericDeclarationpublic Type[] getGenericParameterTypes()
NYI: COMMENT: JDK 1.5 method description
public Type[] getGenericExceptionTypes()
NYI: COMMENT: JDK 1.5 method description
public String toGenericString()
NYI: COMMENT: JDK 1.5 method description
public boolean isVarArgs()
NYI: COMMENT: JDK 1.5 method description
public boolean isSynthetic()
NYI: COMMENT: JDK 1.5 method description
isSynthetic in interface Memberpublic <T extends Annotation> T getAnnotation(Class<T> annotationClass)
AnnotatedElement
getAnnotation in interface AnnotatedElementgetAnnotation in class AccessibleObjectannotationClass - the Class object corresponding to the
annotation type
NullPointerException - if the given annotation class is nullpublic Annotation[] getDeclaredAnnotations()
AnnotatedElement
getDeclaredAnnotations in interface AnnotatedElementgetDeclaredAnnotations in class AccessibleObjectpublic Annotation[][] getParameterAnnotations()
Constructor object. (Returns an array of length zero if the
underlying method is parameterless. If the method has one or more
parameters, a nested array of length zero is returned for each parameter
with no annotations.) The annotation objects contained in the returned
arrays are serializable. The caller of this method is free to modify
the returned arrays; it will have no effect on the arrays returned to
other callers.
|
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||