1 2 12 package com.versant.core.jdo.query; 13 14 import com.versant.core.metadata.ClassMetaData; 15 16 import com.versant.core.common.Debug; 17 18 import com.versant.core.common.BindingSupportImpl; 19 20 24 public class UnaryNode extends Node { 25 26 public UnaryNode() { 27 } 28 29 public UnaryNode(Node child) { 30 childList = child; 31 child.parent = this; 32 } 33 34 public Object accept(NodeVisitor visitor, Object [] results) { 35 return visitor.visitUnaryNode(this, results); 36 } 37 41 public void resolve(QueryParser comp, ClassMetaData cmd, boolean ordering) { 42 if (Debug.DEBUG) System.out.println("### UnaryNode.resolve " + this); 43 childList.resolve(comp, cmd, false); 44 } 45 46 49 public void replaceChild(Node old, Node nw) { 50 if (childList == old) childList = nw; 51 else throw BindingSupportImpl.getInstance().internal("no such Node: " + old); 52 nw.parent = this; 53 nw.next = null; 54 } 55 56 59 protected void normalizeImp() { 60 if (childList != null) 61 childList.normalizeImp(); 62 } 63 64 public Field visit(MemVisitor visitor, Object obj) { 65 return visitor.visitUnaryNode(this, obj); 66 } 67 68 public Object arrive(NodeVisitor v, Object msg) { 69 return v.arriveUnaryNode(this, msg); 70 } 71 72 } 73 | Popular Tags |