@ SuppressWarnings ( "unchecked" ) public < T > ObjectInstantiator < T > newInstantiatorOf ( Class < T > type ) { try { return ( ObjectInstantiator < T > ) constructor . newInstance ( type ) ; } catch ( InstantiationException | IllegalAccessException | InvocationTargetException e ) { throw new ObjenesisException ( e ) ; } }
Return an instantiator for the wanted type and of the one and only type of instantiator returned by this class .