if (clazz != null) {
return clazz.newInstance();
}
return new DefaultApplicationWorker();
} catch (ClassCastException ex) {
throw new ApplicationConfigurationException(ex);
} catch (InstantiationException ex) {
throw new ApplicationConfigurationException(ex);
} catch (IllegalAccessException ex) {
throw new ApplicationConfigurationException(ex);
}
}