Code example for Constructor

Methods: getDeclaringClass

0
    public Object newInstance(Object[] args)
        throws IllegalArgumentException, InvocationTargetException 
    { 
        try { 
            return UnsafeFieldAccessorImpl.unsafe. 
                allocateInstance(constructor.getDeclaringClass());
        } catch (InstantiationException e) {
            throw new InvocationTargetException(e);
        } 
    } 
}