// Remove the accessor from other maps if the type changed.
removeEntityAccessor(metadataClass);
removeEmbeddableAccessor(metadataClass);
if (project.hasMappedSuperclass(metadataClass)) {
MappedSuperclassAccessor mappedSuperclassAccessor = project.getMappedSuperclassAccessor(metadataClass);
// Don't touch it if it was loaded from XML.
if (! mappedSuperclassAccessor.loadedFromXML()) {
if (excludeUnlistedClasses(metadataClass)) {
// remove it!
project.removeMappedSuperclassAccessor(metadataClass);
} else {
// override it!
project.addMappedSuperclass(new MappedSuperclassAccessor(metadataClass.getAnnotation(MappedSuperclass.class), metadataClass, project));
}
}
} else if (! excludeUnlistedClasses(metadataClass)) {
// add it!
project.addMappedSuperclass(new MappedSuperclassAccessor(metadataClass.getAnnotation(MappedSuperclass.class), metadataClass, project));
}
}