Class childClass = null;
try {
childClass = ClassUtils.loadClass(childClassName);
}
catch (Exception e) {
throw new ConfigurationException("Cannot load class '" + childClassName + "' at " + child.getLocation());
}
// Check that this class is not hidden by a more general class already declared
for (int j = 0; j < i; j++) {
if (this.clazz[j].isAssignableFrom(childClass)) {
throw new ConfigurationException("Class '" + this.clazz[j].getName() + "' hides its subclass '" +
childClassName + "' at " + child.getLocation());
}
}
this.clazz[i] = childClass;
this.name[i] = child.getAttribute("name", null);
this.unroll[i] = child.getAttributeAsBoolean("unroll", false);
if (this.name[i] == null && !this.unroll[i]) {
throw new ConfigurationException("Must specify one of 'name' or 'unroll' at " + child.getLocation());
}
}
}