When visiting a map change, i need access to the map key. I'm doing this: ElementSelector elementSelector = node.getPath().getLastElementSelector(); if (elementSelector instanceof MapKeyElementSelector) { Object key = ((MapKeyElementSelector) elementSelector).getKey(); ... } But the getKey() method is deprecated. Is there another way to achieve this? If not, I think that the getKey() is useful and should not be deprecated.