Object obj = null;
try {
Class<?> cls = Class.forName(daoType);
obj = cls.newInstance();
} catch (Exception ex) {
throw new ConfigurationException("Wrong daoType " + daoType, ex);
}
if (!(obj instanceof MetsObjectDAO)) {
throw new ConfigurationException("Wrong daoType " + daoType);
}
return (MetsObjectDAO)obj;
}