1 2 12 package com.versant.core.ejb.query; 13 14 17 public class ConstructorNode extends Node { 18 19 private String name; 20 private Node argsList; 21 22 public ConstructorNode(String name, Node argsList) { 23 this.name = name; 24 this.argsList = argsList; 25 } 26 27 public String getName() { 28 return name; 29 } 30 31 public Node getArgsList() { 32 return argsList; 33 } 34 35 public Object arrive(NodeVisitor v, Object msg) { 36 return v.arriveConstructorNode(this, msg); 37 } 38 39 public String toStringImp() { 40 StringBuffer s = new StringBuffer (); 41 s.append("NEW "); 42 s.append(name); 43 s.append('('); 44 s.append(argsList); 45 for (Node e = argsList.getNext(); e != null; e = e.getNext()) { 46 s.append(", "); 47 s.append(e); 48 } 49 s.append(')'); 50 return s.toString(); 51 } 52 53 public void resolve(ResolveContext rc) { 54 resolve(argsList, rc); 55 } 56 57 } 58 59 | Popular Tags |