@ Deprecated private T build ( Constructor < T > constructor , Object [ ] args ) { try { return constructor . newInstance ( args ) ; } catch ( IllegalArgumentException | IllegalAccessException | InstantiationException ex ) { throw new IllegalArgumentException ( "Bean cannot be created: " + beanName ( ) + " from " + Arrays . toString ( args ) , ex ) ; } catch ( InvocationTargetException ex ) { if ( ex . getCause ( ) instanceof RuntimeException ) { throw ( RuntimeException ) ex . getCause ( ) ; } throw new RuntimeException ( ex ) ; } }
Creates an instance of the bean .