addPotentialEmbeddableAccessor(accessor.getReferenceClass(), accessor.getClassAccessor());
// Tell an embeddable accessor that is a map key to a collection
// to pre-process itself.
if (accessor.isMappedKeyMapAccessor()) {
MappedKeyMapAccessor mapAccessor = (MappedKeyMapAccessor) accessor;
MetadataClass mapKeyClass = mapAccessor.getMapKeyClass();
// If the map key class is not specified, we need to look it
// up from the accessor type.
if (mapKeyClass == null || mapKeyClass.equals(void.class)) {
mapKeyClass = accessor.getAccessibleObject().getMapKeyClass(getDescriptor());
if (mapKeyClass == null) {
// The map key class has not been specified through
// either the map key class metadata or generics. Throw
// an exception.
throw ValidationException.unableToDetermineMapKeyClass(accessor.getAttributeName(), accessor.getJavaClass());
} else {
// Set the map key class (note, may still be null)
mapAccessor.setMapKeyClass(mapKeyClass);
}
}
// Add the embeddable accessor to the project. In the case of
// pre-processing, if we are an embeddable accessor the nested