API Overview API Index Package Overview Direct link to this page
JDK 1.6
  java.lang.reflect. Constructor View Source
Author(s)
Kenneth Russell
Nakul Saraiya
Since
Version
Serial
Hierarchy
 Object
      AccessibleObject
          Constructor
Implements
 GenericDeclaration
 Member
Subclasses
Description
publicfinal class Constructor
  Constructor provides information about, and access to, a single constructor for a class.
Constructors
pack-private Constructor (Class< T> declaringClass, Class parameterTypes, Class checkedExceptions, int modifiers, int slot, String signature, byte[] annotations, byte[] parameterAnnotations)
Package-private constructor used by ReflectAccess to enable instantiation of these objects in Java code from the java.lang package via sun.reflect.LangReflectAccess.
Methods
Hide/Show inherited methods
pack-private Constructor< T> copy ()
  Package-private routine (exposed to java.lang.Class via ReflectAccess) which returns a copy of this Constructor.
public boolean equals (Object obj)
  Compares this Constructor against the specified object.
public T getAnnotation (Class< T> annotationClass) [Overrides AccessibleObject]
 
public Annotation getAnnotations () [Inherited From AccessibleObject]
 
pack-private sun.reflect.ConstructorAccessor getConstructorAccessor ()
public Annotation getDeclaredAnnotations () [Overrides AccessibleObject]
 
public Class< T> getDeclaringClass () [Specified in Member]
Returns the Class object representing the class that declares the constructor represented by this Constructor object.
public Class<Object> getExceptionTypes ()
  Returns an array of Class objects that represent the types of exceptions declared to be thrown by the underlying constructor represented by this Constructor object.
public Type getGenericExceptionTypes ()
  Returns an array of Type objects that represent the exceptions declared to be thrown by this Constructor object.
public Type getGenericParameterTypes ()
  Returns an array of Type objects that represent the formal parameter types, in declaration order, of the method represented by this Constructor object.
public int getModifiers () [Specified in Member]
  Returns the Java language modifiers for the constructor represented by this Constructor object, as an integer.
public String getName () [Specified in Member]
  Returns the name of this constructor, as a string.
public 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.
public Class<Object> getParameterTypes ()
  Returns an array of Class objects that represent the formal parameter types, in declaration order, of the constructor represented by this Constructor object.
pack-private byte getRawAnnotations ()
pack-private byte getRawParameterAnnotations ()
pack-private String getSignature ()
pack-private int getSlot ()
public TypeVariable<Constructor< T>> getTypeParameters () [Specified in GenericDeclaration]
  Returns an array of TypeVariable objects that represent the type variables declared by the generic declaration represented by this GenericDeclaration object, in declaration order.
public int hashCode ()
  Returns a hashcode for this Constructor.
public boolean isAccessible () [Inherited From AccessibleObject]
  Get the value of the accessible flag for this object.
public boolean isAnnotationPresent (Class<Annotation> annotationClass) [Inherited From AccessibleObject]
 
public boolean isSynthetic () [Specified in Member]
  Returns true if this constructor is a synthetic constructor; returns false otherwise.
public boolean isVarArgs ()
  Returns true if this constructor was declared to take a variable number of arguments; returns false otherwise.
public T newInstance (Object initargs) throws InstantiationException IllegalAccessException IllegalArgumentException InvocationTargetException
  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.
publicstatic void setAccessible (AccessibleObject array, boolean flag) throws SecurityException [Inherited From AccessibleObject]
  Convenience method to set the accessible flag for an array of objects with a single security check (for efficiency).
public void setAccessible (boolean flag) throws SecurityException [Inherited From AccessibleObject]
  Set the accessible flag for this object to the indicated boolean value.
pack-private void setConstructorAccessor (sun.reflect.ConstructorAccessor accessor)
public String toGenericString ()
  Returns a string describing this Constructor, including type parameters.
public String toString ()
  Returns a string describing this Constructor.
Fields
Hide/Show inherited fields
publicfinalstatic int DECLARED = "1" [Inherited From Member]
  Identifies the set of declared members of a class or interface.
pack-private boolean override [Inherited From AccessibleObject]
publicfinalstatic int PUBLIC = "0" [Inherited From Member]
  Identifies the set of all public members of a class or interface, including inherited members.
pack-privatefinalstatic sun.reflect.ReflectionFactory reflectionFactory [Inherited From AccessibleObject]
Nested Classes
Generated By: JavaOnTracks Doclet 0.1.4     ©Thibaut Colar