org.jruby.ast
Class AssignableNode

java.lang.Object
  extended by org.jruby.ast.Node
      extended by org.jruby.ast.AssignableNode
All Implemented Interfaces:
IArityNode, ISourcePositionHolder
Direct Known Subclasses:
ClassVarAsgnNode, ClassVarDeclNode, ConstDeclNode, DAsgnNode, GlobalAsgnNode, InstAsgnNode, LocalAsgnNode, MultipleAsgnNode

public abstract class AssignableNode
extends Node
implements IArityNode

Base class of any node which can be assigned to.


Field Summary
 
Fields inherited from class org.jruby.ast.Node
EMPTY_COMMENT_LIST, INVALID_POSITION, nodeId
 
Constructor Summary
AssignableNode(ISourcePosition position, NodeType id)
           
AssignableNode(ISourcePosition position, NodeType id, Node valueNode)
           
 
Method Summary
 java.lang.String definition(Ruby runtime, ThreadContext context, IRubyObject self, Block aBlock)
           
 Arity getArity()
          Almost all assignables are only assigned a single value.
 Node getValueNode()
          Gets the valueNode.
 void setValueNode(Node valueNode)
          Sets the valueNode.
 
Methods inherited from class org.jruby.ast.Node
accept, addComment, addComments, assign, childNodes, createList, getComments, getNodeName, getPosition, getPositionIncludingComments, hasComments, interpret, isInvisible, setPosition, toString
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

AssignableNode

public AssignableNode(ISourcePosition position,
                      NodeType id)

AssignableNode

public AssignableNode(ISourcePosition position,
                      NodeType id,
                      Node valueNode)
Method Detail

getValueNode

public Node getValueNode()
Gets the valueNode.

Returns:
Returns a Node

setValueNode

public void setValueNode(Node valueNode)
Sets the valueNode.

Parameters:
valueNode - The valueNode to set

getArity

public Arity getArity()
Almost all assignables are only assigned a single value.

Specified by:
getArity in interface IArityNode

definition

public java.lang.String definition(Ruby runtime,
                                   ThreadContext context,
                                   IRubyObject self,
                                   Block aBlock)
Overrides:
definition in class Node


Copyright © 2002-2007 JRuby Team. All Rights Reserved.