public static Object newInstance ( final IClassWriter classMock ) { try { final Class < ? > clazz = classMock . build ( ) ; return clazz . newInstance ( ) ; } catch ( final Exception e ) { throw new RuntimeException ( "Can't intanciate class" , e ) ; } }
Creates a new instance from class generated by IClassWriter