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 50 public class Colon3Node extends Node implements INameNode { 51 static final long serialVersionUID = 8860717109371016871L; 52 53 private String name; 54 55 public Colon3Node(ISourcePosition position, String name) { 56 super(position, NodeTypes.COLON3NODE); 57 this.name = name.intern(); 58 } 59 60 public Colon3Node(ISourcePosition position, int id, String name) { 61 super(position, id); 62 this.name = name.intern(); 63 } 64 65 private void readObject(java.io.ObjectInputStream in) throws IOException , ClassNotFoundException { 66 in.defaultReadObject(); 67 68 name = name.intern(); 70 } 71 72 76 public Instruction accept(NodeVisitor iVisitor) { 77 return iVisitor.visitColon3Node(this); 78 } 79 80 84 public String getName() { 85 return name; 86 } 87 88 public List childNodes() { 89 return EMPTY_LIST; 90 } 91 92 public void setName(String name) { 93 this.name = name; 94 } 95 96 } 97 | Popular Tags |