Constructor (Java Platform SE 8 ) (original) (raw)
Modifier and Type
Method
Description
boolean
[equals](../../../java/lang/reflect/Constructor.html#equals-java.lang.Object-)([Object](../../../java/lang/Object.html "class in java.lang") obj)
Compares this Constructor
against the specified object.
[AnnotatedType](../../../java/lang/reflect/AnnotatedType.html "interface in java.lang.reflect")
[getAnnotatedReceiverType](../../../java/lang/reflect/Constructor.html#getAnnotatedReceiverType--)()
Returns an AnnotatedType
object that represents the use of a type to specify the receiver type of the method/constructor represented by this Executable object.
[AnnotatedType](../../../java/lang/reflect/AnnotatedType.html "interface in java.lang.reflect")
[getAnnotatedReturnType](../../../java/lang/reflect/Constructor.html#getAnnotatedReturnType--)()
Returns an AnnotatedType
object that represents the use of a type to specify the return type of the method/constructor represented by this Executable.
<T extends [Annotation](../../../java/lang/annotation/Annotation.html "interface in java.lang.annotation")> T
[getAnnotation](../../../java/lang/reflect/Constructor.html#getAnnotation-java.lang.Class-)([Class](../../../java/lang/Class.html "class in java.lang")<T> annotationClass)
Returns this element's annotation for the specified type if such an annotation is present, else null.
[Annotation](../../../java/lang/annotation/Annotation.html "interface in java.lang.annotation")[]
[getDeclaredAnnotations](../../../java/lang/reflect/Constructor.html#getDeclaredAnnotations--)()
Returns annotations that are directly present on this element.
[Class](../../../java/lang/Class.html "class in java.lang")<[T](../../../java/lang/reflect/Constructor.html "type parameter in Constructor")>
[getDeclaringClass](../../../java/lang/reflect/Constructor.html#getDeclaringClass--)()
Returns the Class
object representing the class or interface that declares the executable represented by this object.
[Class](../../../java/lang/Class.html "class in java.lang")<?>[]
[getExceptionTypes](../../../java/lang/reflect/Constructor.html#getExceptionTypes--)()
Returns an array of Class
objects that represent the types of exceptions declared to be thrown by the underlying executable represented by this object.
[Type](../../../java/lang/reflect/Type.html "interface in java.lang.reflect")[]
[getGenericExceptionTypes](../../../java/lang/reflect/Constructor.html#getGenericExceptionTypes--)()
Returns an array of Type
objects that represent the exceptions declared to be thrown by this executable object.
[Type](../../../java/lang/reflect/Type.html "interface in java.lang.reflect")[]
[getGenericParameterTypes](../../../java/lang/reflect/Constructor.html#getGenericParameterTypes--)()
Returns an array of Type
objects that represent the formal parameter types, in declaration order, of the executable represented by this object.
int
[getModifiers](../../../java/lang/reflect/Constructor.html#getModifiers--)()
Returns the Java language modifiers for the executable represented by this object.
[String](../../../java/lang/String.html "class in java.lang")
[getName](../../../java/lang/reflect/Constructor.html#getName--)()
Returns the name of this constructor, as a string.
[Annotation](../../../java/lang/annotation/Annotation.html "interface in java.lang.annotation")[][]
[getParameterAnnotations](../../../java/lang/reflect/Constructor.html#getParameterAnnotations--)()
Returns an array of arrays of Annotation
s that represent the annotations on the formal parameters, in declaration order, of the Executable
represented by this object.
int
[getParameterCount](../../../java/lang/reflect/Constructor.html#getParameterCount--)()
Returns the number of formal parameters (whether explicitly declared or implicitly declared or neither) for the executable represented by this object.
[Class](../../../java/lang/Class.html "class in java.lang")<?>[]
[getParameterTypes](../../../java/lang/reflect/Constructor.html#getParameterTypes--)()
Returns an array of Class
objects that represent the formal parameter types, in declaration order, of the executable represented by this object.
[TypeVariable](../../../java/lang/reflect/TypeVariable.html "interface in java.lang.reflect")<[Constructor](../../../java/lang/reflect/Constructor.html "class in java.lang.reflect")<[T](../../../java/lang/reflect/Constructor.html "type parameter in Constructor")>>[]
[getTypeParameters](../../../java/lang/reflect/Constructor.html#getTypeParameters--)()
Returns an array of TypeVariable
objects that represent the type variables declared by the generic declaration represented by thisGenericDeclaration
object, in declaration order.
int
[hashCode](../../../java/lang/reflect/Constructor.html#hashCode--)()
Returns a hashcode for this Constructor
.
boolean
[isSynthetic](../../../java/lang/reflect/Constructor.html#isSynthetic--)()
Returns true
if this executable is a synthetic construct; returns false
otherwise.
boolean
[isVarArgs](../../../java/lang/reflect/Constructor.html#isVarArgs--)()
Returns true
if this executable was declared to take a variable number of arguments; returns false
otherwise.
[T](../../../java/lang/reflect/Constructor.html "type parameter in Constructor")
[newInstance](../../../java/lang/reflect/Constructor.html#newInstance-java.lang.Object...-)([Object](../../../java/lang/Object.html "class in java.lang")... 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.
[String](../../../java/lang/String.html "class in java.lang")
[toGenericString](../../../java/lang/reflect/Constructor.html#toGenericString--)()
Returns a string describing this Constructor
, including type parameters.
[String](../../../java/lang/String.html "class in java.lang")
[toString](../../../java/lang/reflect/Constructor.html#toString--)()
Returns a string describing this Constructor
.