public class SimpleConstructorAccessor extends Object implements ConstructorAccessor
| Constructor and Description |
|---|
SimpleConstructorAccessor(Constructor<?> constructor) |
public SimpleConstructorAccessor(Constructor<?> constructor)
constructor - the constructorpublic Object newInstance(Object[] args) throws InstantiationException, IllegalArgumentException, InvocationTargetException, IllegalAccessException
newInstance in interface ConstructorAccessorargs - the argumentsInstantiationException - if the class that declares the underlying constructor represents an abstract class.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.InvocationTargetException - if the underlying constructor throws an exception.IllegalAccessException - if this Constructor object is enforcing Java language access control and the underlying constructor is
inaccessible.Constructor.newInstance(Object...)Copyright © 2012 Batoo Software & Consultancy. All Rights Reserved.