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.
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.
Individual parameters are automatically unwrapped to match
primitive formal parameters, and both primitive and reference
parameters are subject to method invocation conversions as necessary.
If the number of formal parameters required by the underlying constructor
is 0, the supplied initargs
array may be of length 0 or null.
If the constructor's declaring class is an inner class in a
non-static context, the first argument to the constructor needs
to be the enclosing instance; see The Java Language
Specification, section 15.9.3.
If the required access and argument checks succeed and the
instantiation will proceed, the constructor's declaring class
is initialized if it has not already been initialized.
If the constructor completes normally, returns the newly
created and initialized instance.
Returns:
a new object created by calling the constructor
this object represents
Parameters:
- initargs - array of objects to be passed as arguments to
the constructor call; values of primitive types are wrapped in
a wrapper object of the appropriate type (e.g. a float
in a {@link java.lang.Float Float})
Throws:
- IllegalAccessException - if this Constructor
object
enforces Java language access control and the underlying
constructor is inaccessible.
- IllegalArgumentException - if the number of actual
and formal parameters differ; if an unwrapping
conversion for primitive arguments fails; or if,
after possible unwrapping, a parameter value
cannot be converted to the corresponding formal
parameter type by a method invocation conversion; if
this constructor pertains to an enum type.
- InstantiationException - if the class that declares the
underlying constructor represents an abstract class.
- InvocationTargetException - if the underlying constructor
throws an exception.
- ExceptionInInitializerError - if the initialization provoked
by this method fails.