public void start(ObjectTypePair node) {
   if (node == null) {
     return;
   }
   if (ancestors.contains(node)) {
     throw new CircularReferenceException(node);
   }
   ancestors.push(node);
 }
 public void end(ObjectTypePair node) {
   if (node != null) {
     ancestors.pop();
   }
 }