public static < T > T newInstance ( Class < T > clazz ) { try { return clazz . newInstance ( ) ; } catch ( InstantiationException | IllegalAccessException e ) { throw new ResourceException ( String . format ( "couldn't create a new instance of %s" , clazz ) ) ; } }
Create a new instance of a resource using a default constructor