118 return cons.newInstance(emptyObject); |
118 return cons.newInstance(emptyObject); |
119 } |
119 } |
120 |
120 |
121 /** |
121 /** |
122 * The same as {@link #create0} but with an error handling to make |
122 * The same as {@link #create0} but with an error handling to make |
123 * the instanciation error fatal. |
123 * the instantiation error fatal. |
124 */ |
124 */ |
125 public static <T> T create( Class<T> clazz ) { |
125 public static <T> T create( Class<T> clazz ) { |
126 try { |
126 try { |
127 return create0(clazz); |
127 return create0(clazz); |
128 } catch (InstantiationException e) { |
128 } catch (InstantiationException e) { |