@ SuppressWarnings ( "unchecked" ) public T create ( Object [ ] args ) { for ( int i = 0 , n = args . length ; i < n ; i ++ ) { if ( arguments [ i ] instanceof FactoryDefinition . InjectedArgument ) { args [ i ] = arguments [ i ] . getValue ( null ) ; } } try { return ( T ) raw . newInstance ( args ) ; } catch ( IllegalArgumentException e ) { throw new SerializationException ( "Unable to create; " + e . getMessage ( ) , e ) ; } catch ( InstantiationException e ) { throw new SerializationException ( "Unable to create; " + e . getMessage ( ) , e ) ; } catch ( IllegalAccessException e ) { throw new SerializationException ( "Unable to create; " + e . getMessage ( ) , e ) ; } catch ( InvocationTargetException e ) { throw new SerializationException ( "Unable to create; " + e . getCause ( ) . getMessage ( ) , e . getCause ( ) ) ; } }
Create a new instance using a plain arguments array .