Invokes the underlying method represented by this method object on
the specified object with the specified parameters. Individual
parameters are subject to widening conversions as necessary.
Method invocation proceeds in the following order of steps:
If the specified object argument is NULL, the invocation
throws an IllegalArgumentException . Otherwise,
if the specified object argument is not an instance of the
class or interface declaring the underlying method, the
invocation throws an IllegalArgumentException .
If the number of actual parameters supplied via args is
different from the number of formal parameters required by
the underlying method, the invocation throws an
IllegalArgumentException .
For each actual parameter in the supplied args array:
- If the parameter value cannot be converted to the
corresponding formal parameter type by an
identity or widening conversion, the
invocation throws an IllegalArgumentException .
When the control transfers to the underlying method and
the method stops abruptly by throwing an exception, the exception
is placed in an InvocationTargetException and thrown
in turn to the caller of
.
If the method completes normally, the value it returns
is returned to the caller of
.
If the underlying method return type is void, the invocation
returns void>
.