1 31 package org.jruby.ast; 32 33 import java.io.IOException ; 34 import java.util.List ; 35 36 import org.jruby.ast.visitor.NodeVisitor; 37 import org.jruby.evaluator.Instruction; 38 import org.jruby.lexer.yacc.ISourcePosition; 39 40 44 public class VAliasNode extends Node { 45 static final long serialVersionUID = 8647860367861922838L; 46 47 private String oldName; 48 private String newName; 49 50 public VAliasNode(ISourcePosition position, String newName, String oldName) { 51 super(position, NodeTypes.VALIASNODE); 52 this.oldName = oldName.intern(); 53 this.newName = newName.intern(); 54 } 55 56 private void readObject(java.io.ObjectInputStream in) throws IOException , ClassNotFoundException { 57 in.defaultReadObject(); 58 59 oldName = oldName.intern(); 61 newName = newName.intern(); 62 } 63 64 68 public Instruction accept(NodeVisitor iVisitor) { 69 return iVisitor.visitVAliasNode(this); 70 } 71 72 76 public String getNewName() { 77 return newName; 78 } 79 80 84 public String getOldName() { 85 return oldName; 86 } 87 88 public List childNodes() { 89 return EMPTY_LIST; 90 } 91 92 } 93 | Popular Tags |