@SuppressWarnings("unchecked")
public <A, B> void registerClassMap(ClassMap<A, B> classMap) {
classMapRegistry.put(new MapperKey(classMap.getAType(), classMap.getBType()), (ClassMap<Object, Object>) classMap);
if (isBuilding || isBuilt) {
MappingContext context = contextFactory.getContext();
try {
buildMapper(classMap, /** isAutoGenerated == **/isBuilding, context);
buildObjectFactories(classMap, context);
initializeUsedMappers(classMap);