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 46 public class ClassVarAsgnNode extends AssignableNode implements INameNode { 47 static final long serialVersionUID = -2960487069128667341L; 48 49 private String name; 50 51 55 public ClassVarAsgnNode(ISourcePosition position, String name, Node valueNode) { 56 super(position, NodeTypes.CLASSVARASGNNODE); 57 this.name = name.intern(); 58 59 setValueNode(valueNode); 60 } 61 62 private void readObject(java.io.ObjectInputStream in) throws IOException , ClassNotFoundException { 63 in.defaultReadObject(); 64 65 name = name.intern(); 67 } 68 69 73 public Instruction accept(NodeVisitor iVisitor) { 74 return iVisitor.visitClassVarAsgnNode(this); 75 } 76 77 81 public String getName() { 82 return name; 83 } 84 85 public List childNodes() { 86 return createList(getValueNode()); 87 } 88 89 } 90 | Popular Tags |