java.lang.Object | |||
java.lang.reflect.AccessibleObject | AnnotatedElement | ||
java.lang.reflect.Constructor<T> | GenericDeclaration Member |
This class models a constructor. Information about the constructor can be accessed, and the constructor can be invoked dynamically.
boolean | equals(Object object) | |||||
Compares the specified object to this Constructor and answer if they are equal. | ||||||
Annotation[] | getDeclaredAnnotations() | |||||
Gets all Annotations that are explicitly declared by this element (not inherited). | ||||||
Class<T> | getDeclaringClass() | |||||
Return the Class associated with the class that defined this constructor. | ||||||
Class[]<?> | getExceptionTypes() | |||||
Return an array of the Class objects associated with the exceptions declared to be thrown by this constructor. | ||||||
Type[] | getGenericExceptionTypes() | |||||
Gets the exception types as an array of Type instances. |
||||||
Type[] | getGenericParameterTypes() | |||||
Gets the parameter types as an array of Type instances, in declaration order. |
||||||
int | getModifiers() | |||||
Return the modifiers for the modeled constructor. | ||||||
String | getName() | |||||
Return the name of the modeled constructor. | ||||||
Annotation[][] | getParameterAnnotations() | |||||
Gets an array of arrays that represent the annotations of the formal parameters of this constructor. |
||||||
Class[]<?> | getParameterTypes() | |||||
Return an array of the Class objects associated with the parameter types of this constructor. | ||||||
TypeVariable[]<Constructor<T>> | getTypeParameters() | |||||
Returns an array of generic type variables used in this constructor. | ||||||
int | hashCode() | |||||
Returns an integer hash code for the receiver. | ||||||
boolean | isSynthetic() | |||||
Indicates whether or not this constructor is synthetic. |
||||||
boolean | isVarArgs() | |||||
Indicates whether or not this constructor takes a variable number argument. |
||||||
T | newInstance(Object[] args) | |||||
Return a new instance of the declaring class, initialized by dynamically invoking the modeled constructor. | ||||||
String | toGenericString() | |||||
Returns the String representation of the constructor's declaration, including the type parameters. |
||||||
String | toString() | |||||
Returns a string containing a concise, human-readable description of the receiver. |
object | the object to compare |
---|
Gets the exception types as an array of Type instances. If the constructor has no declared exceptions, then an empty array is returned.
GenericSignatureFormatError | if the generic method signature is invalid. |
---|---|
TypeNotPresentException | if the component type points to a missing type. |
MalformedParameterizedTypeException | if the component type points to a type that can't be instantiated for some reason. |
Gets the parameter types as an array of Type instances, in declaration order. If the constructor has no parameters, then an empty array is returned.
GenericSignatureFormatError | if the generic method signature is invalid. |
---|---|
TypeNotPresentException | if the component type points to a missing type. |
MalformedParameterizedTypeException | if the component type points to a type that can't be instantiated for some reason. |
Gets an array of arrays that represent the annotations of the formal parameters of this constructor. If there are no parameters on this constructor, then an empty array is returned. If there are no annotations set, then and array of empty arrays is returned.
Indicates whether or not this constructor is synthetic.
true
if it is synthetic, or
false
otherwise.Indicates whether or not this constructor takes a variable number argument.
true
if a vararg is declare, otherwise
false
.new declaringClass(arg1, arg2, ... , argN)
This method
performs the following:
args | the arguments to the constructor |
---|
InstantiationException | if the class cannot be instantiated |
---|---|
IllegalAccessException | if the modeled constructor is not accessible |
IllegalArgumentException | if an incorrect number of arguments are passed, or an argument could not be converted by a widening conversion |
InvocationTargetException | if an exception was thrown by the invoked constructor |
Returns the String representation of the constructor's declaration, including the type parameters.
public String(byte[],String) throws UnsupportedEncodingException
Copyright 2007 Google Inc. | Build 0.9_r1-98467 - 14 Aug 2008 18:56 |