injectedFieldsModel.inject( injectionContext, instance );
injectedMethodsModel.inject( injectionContext, instance );
}
catch( Exception e )
{
throw new ConstructionException( "Could not instantiate " + objectType.getName(), e );
}
if( instance instanceof Initializable )
{
try
{
( (Initializable) instance ).initialize();
}
catch( InitializationException e )
{
throw new ConstructionException( "Unable to initialize " + objectType, e );
}
}
return instance;
}