1 32 package org.jruby.ast; 33 34 import java.io.IOException ; 35 import java.util.List ; 36 37 import org.jruby.ast.types.INameNode; 38 import org.jruby.ast.visitor.NodeVisitor; 39 import org.jruby.evaluator.Instruction; 40 import org.jruby.lexer.yacc.ISourcePosition; 41 42 47 public class ClassVarDeclNode extends AssignableNode implements INameNode { 48 static final long serialVersionUID = -6227934966029974915L; 49 50 private String name; 51 52 public ClassVarDeclNode(ISourcePosition position, String name, Node valueNode) { 53 super(position, NodeTypes.CLASSVARDECLNODE); 54 55 this.name = name.intern(); 56 57 setValueNode(valueNode); 58 } 59 60 private void readObject(java.io.ObjectInputStream in) throws IOException , ClassNotFoundException { 61 in.defaultReadObject(); 62 63 name = name.intern(); 65 } 66 67 71 public Instruction accept(NodeVisitor iVisitor) { 72 return iVisitor.visitClassVarDeclNode(this); 73 } 74 75 79 public String getName() { 80 return name; 81 } 82 83 public List childNodes() { 84 return createList(getValueNode()); 85 } 86 87 } 88 | Popular Tags |