src/main/java/com/mistraltech/smog/proxy/javassist/util/JavaReflectionUtils.java
public static <T> T createInstance(Constructor<T> constructor) {
        try {
            return constructor.newInstance();
        } catch (InstantiationException e) {
            throw new RuntimeException("Failed to instantiate class", e);
        } catch (IllegalAccessException e) {
            throw new RuntimeException("Illegal access", e);
        } catch (InvocationTargetException e) {
            throw new RuntimeException("Failed to invoke constructor", e);
        }
    }
/**
     * Create an instance of a class using the supplied constructor.
     *
     * @param constructor the constructor
     * @param <T> the type of the instance being constructed
     * @return the instance
     */
Create an instance of a class using the supplied constructor.
@param constructor the constructor
@param  the type of the instance being constructed
@return the instance
Create an instance of a class using the supplied constructor . @param constructor the constructor @param the type of the instance being constructed @return the instance
public static <T> T createInstance(Constructor<T> constructor) {
        try {
            return constructor.newInstance();
        } catch (InstantiationException e) {
            throw new RuntimeException("Failed to instantiate class", e);
        } catch (IllegalAccessException e) {
            throw new RuntimeException("Illegal access", e);
        } catch (InvocationTargetException e) {
            throw new RuntimeException("Failed to invoke constructor", e);
        }
    }
public static < T > T createInstance ( Constructor < T > constructor ) { try { return constructor . newInstance ( ) ; } catch ( InstantiationException e ) { throw new RuntimeException ( "Failed to instantiate class" , e ) ; } catch ( IllegalAccessException e ) { throw new RuntimeException ( "Illegal access" , e ) ; } catch ( InvocationTargetException e ) { throw new RuntimeException ( "Failed to invoke constructor" , e ) ; } }
Create an instance of a class using the supplied constructor.
Create an instance of a class using the supplied constructor .