public void register(Object source, Object target, APath path) {
if(map.containsKey(source)) {
final Object prev = map.get(source);
if(prev == target) {
throw new AMapperException("duplicate registration of same target " + target + " for " + source, path);
}
else {
throw new AMapperException("duplicate registration of different target " + target + " and " + prev + " for " + source, path);
}
}
else {
map.put(source, AOption.some(target));
}