// Remove the accessor from other maps if the type changed.
removeEntityAccessor(metadataClass);
removeEmbeddableAccessor(metadataClass);
if (project.hasMappedSuperclass(metadataClass)) {
MappedSuperclassAccessor mappedSuperclassAccessor = project.getMappedSuperclassAccessor(metadataClass);
// If it was loaded from XML, reset the pre-processed flag.
if (mappedSuperclassAccessor.loadedFromXML()) {
mappedSuperclassAccessor.clearPreProcessed();
} else {
// Was not loaded from XML and existed in the project.
if (excludeUnlistedClasses(metadataClass)) {
// Exclude unlisted classes is now false, remove it!
project.removeMappedSuperclassAccessor(metadataClass);
} else {
// Otherwise, override the existing accessor!
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));
}
}