MetadataClass candidateClass = m_factory.getMetadataClass(className);
// Bug 227630: Do not process a null class whether it was from a
// NPE or a CNF, a warning or exception is thrown in loadClass()
if (candidateClass != null) {
if (PersistenceUnitProcessor.isEntity(candidateClass) && ! m_project.hasEntity(candidateClass)) {
m_project.addEntityAccessor(new EntityAccessor(PersistenceUnitProcessor.getEntityAnnotation(candidateClass), candidateClass, m_project));
} else if (PersistenceUnitProcessor.isEmbeddable(candidateClass) && ! m_project.hasEmbeddable(candidateClass)) {
m_project.addEmbeddableAccessor(new EmbeddableAccessor(PersistenceUnitProcessor.getEmbeddableAnnotation(candidateClass), candidateClass, m_project));
} else if (PersistenceUnitProcessor.isStaticMetamodelClass(candidateClass)) {
m_project.addStaticMetamodelClass(PersistenceUnitProcessor.getStaticMetamodelAnnotation(candidateClass), candidateClass);
}