1 31 package org.jruby.ast; 32 33 import java.io.IOException ; 34 import java.util.List ; 35 36 import org.jruby.ast.types.INameNode; 37 import org.jruby.ast.visitor.NodeVisitor; 38 import org.jruby.evaluator.Instruction; 39 import org.jruby.lexer.yacc.ISourcePosition; 40 41 45 public class GlobalVarNode extends Node implements INameNode { 46 static final long serialVersionUID = -8913633094119740033L; 47 48 private String name; 49 50 public GlobalVarNode(ISourcePosition position, String name) { 51 super(position, NodeTypes.GLOBALVARNODE); 52 this.name = name.intern(); 53 } 54 55 private void readObject(java.io.ObjectInputStream in) throws IOException , ClassNotFoundException { 56 in.defaultReadObject(); 57 58 name = name.intern(); 60 } 61 62 66 public Instruction accept(NodeVisitor iVisitor) { 67 return iVisitor.visitGlobalVarNode(this); 68 } 69 70 74 public String getName() { 75 return name; 76 } 77 78 public List childNodes() { 79 return EMPTY_LIST; 80 } 81 } 82 | Popular Tags |