public static < T > T newInstance ( Type type ) { try { Class < T > clazz = ( Class < T > ) getClass ( type ) ; if ( clazz == null ) { return null ; } return clazz . newInstance ( ) ; } catch ( Exception e ) { log . warn ( "new instance fail :{}" , e . getCause ( ) . toString ( ) ) ; throw new NewInstanceException ( e . getCause ( ) . toString ( ) ) ; } }
Create an instance of the none constructor .