1 31 package org.jruby.ast; 32 33 import java.io.IOException ; 34 import java.util.List ; 35 36 import org.jruby.ast.visitor.NodeVisitor; 37 import org.jruby.evaluator.Instruction; 38 import org.jruby.lexer.yacc.ISourcePosition; 39 40 51 public class OpElementAsgnNode extends Node { 52 static final long serialVersionUID = 1509701560452403776L; 53 54 private final Node receiverNode; 55 private String operatorName; 56 private final Node argsNode; 57 private final Node valueNode; 58 59 public OpElementAsgnNode(ISourcePosition position, Node receiverNode, String operatorName, Node argsNode, Node valueNode) { 60 super(position, NodeTypes.OPELEMENTASGNNODE); 61 this.receiverNode = receiverNode; 62 this.operatorName = operatorName.intern(); 63 this.argsNode = argsNode; 64 this.valueNode = valueNode; 65 } 66 67 private void readObject(java.io.ObjectInputStream in) throws IOException , ClassNotFoundException { 68 in.defaultReadObject(); 69 70 operatorName = operatorName.intern(); 72 } 73 74 78 public Instruction accept(NodeVisitor iVisitor) { 79 return iVisitor.visitOpElementAsgnNode(this); 80 } 81 82 86 public Node getArgsNode() { 87 return argsNode; 88 } 89 90 94 public String getOperatorName() { 95 return operatorName; 96 } 97 98 102 public Node getReceiverNode() { 103 return receiverNode; 104 } 105 106 110 public Node getValueNode() { 111 return valueNode; 112 } 113 114 public List childNodes() { 115 return Node.createList(receiverNode, argsNode, valueNode); 116 } 117 } 118 | Popular Tags |