configuration.getClasses().add( cls );
}
}
void addPackageFromChangeSet(Resource resource) throws SAXException, IOException {
XmlChangeSetReader reader = new XmlChangeSetReader( this.configuration.getSemanticModules() );
if (resource instanceof ClassPathResource) {
reader.setClassLoader( ( (ClassPathResource) resource ).getClassLoader(),
( (ClassPathResource) resource ).getClazz() );
} else {
reader.setClassLoader( this.configuration.getClassLoader(),
null );
}
Reader resourceReader = null;
try {
resourceReader = resource.getReader();
ChangeSet changeSet = reader.read( resourceReader );
if (changeSet == null) {
// @TODO should log an error
}
for (Resource nestedResource : changeSet.getResourcesAdded()) {
InternalResource iNestedResourceResource = (InternalResource) nestedResource;