1 28 package org.jruby.ast; 29 30 import java.io.IOException ; 31 import java.util.List ; 32 33 import org.jruby.ast.types.INameNode; 34 import org.jruby.ast.visitor.NodeVisitor; 35 import org.jruby.evaluator.Instruction; 36 import org.jruby.lexer.yacc.ISourcePosition; 37 38 42 public class ArgumentNode extends Node implements INameNode { 43 private static final long serialVersionUID = -6375678995811376530L; 44 private String identifier; 45 46 public ArgumentNode(ISourcePosition position, String identifier) { 47 super(position, NodeTypes.ARGUMENTNODE); 48 49 this.identifier = identifier.intern(); 50 } 51 52 private void readObject(java.io.ObjectInputStream in) throws IOException , ClassNotFoundException { 53 in.defaultReadObject(); 54 55 identifier = identifier.intern(); 56 } 57 58 public Instruction accept(NodeVisitor visitor) { 59 throw new RuntimeException ("ArgumentNode should never be evaluated"); 60 } 61 62 public String getName() { 63 return identifier; 64 } 65 66 public void setName(String name) { 67 this.identifier = name; 68 } 69 70 public List childNodes() { 71 return EMPTY_LIST; 72 } 73 } 74 | Popular Tags |