org.jruby.ast
Class Node

java.lang.Object
  extended byorg.jruby.ast.Node
All Implemented Interfaces:
InstructionContext, ISourcePositionHolder, java.io.Serializable
Direct Known Subclasses:
AliasNode, AndNode, ArgsCatNode, ArgsNode, ArgsPushNode, ArgumentNode, AssignableNode, AttrAssignNode, BackRefNode, BeginNode, BignumNode, BlockArgNode, BlockPassNode, BreakNode, CallNode, CaseNode, ClassNode, ClassVarNode, Colon3Node, CommentNode, ConstNode, DefinedNode, DotNode, DVarNode, EnsureNode, EvStrNode, FalseNode, FCallNode, FixnumNode, FlipNode, FloatNode, GlobalVarNode, HashNode, IfNode, InstVarNode, IterNode, ListNode, LocalVarNode, Match2Node, Match3Node, MatchNode, MethodDefNode, ModuleNode, NewlineNode, NextNode, NilNode, NotNode, NthRefNode, OpAsgnAndNode, OpAsgnNode, OpAsgnOrNode, OpElementAsgnNode, OptNNode, OrNode, RedoNode, RegexpNode, RescueBodyNode, RescueNode, RetryNode, ReturnNode, RootNode, SClassNode, SelfNode, SplatNode, StarNode, StrNode, SuperNode, SValueNode, SymbolNode, ToAryNode, TrueNode, UndefNode, UntilNode, VAliasNode, VCallNode, WhenNode, WhileNode, XStrNode, YieldNode, ZArrayNode, ZeroArgNode, ZSuperNode

public abstract class Node
extends java.lang.Object
implements ISourcePositionHolder, InstructionContext, java.io.Serializable

Author:
jpetersen
See Also:
Serialized Form

Field Summary
 InstructionBundle instruction
           
 int nodeId
           
 
Constructor Summary
Node(ISourcePosition position, int id)
           
 
Method Summary
abstract  Instruction accept(NodeVisitor visitor)
           
 void addComment(CommentNode comment)
           
 void addComments(java.util.Collection comments)
           
abstract  java.util.List childNodes()
           
protected static java.util.List createList(Node node)
           
protected static java.util.List createList(Node node1, Node node2)
           
protected static java.util.List createList(Node node1, Node node2, Node node3)
           
protected static java.util.List createList(Node node1, Node node2, Node node3, Node node4)
           
 java.util.Collection getComments()
           
protected  java.lang.String getNodeName()
           
 ISourcePosition getPosition()
          Location of this node within the source
 ISourcePosition getPositionIncludingComments()
           
 boolean hasComments()
           
 void setPosition(ISourcePosition position)
           
 java.lang.String toString()
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

nodeId

public final int nodeId

instruction

public InstructionBundle instruction
Constructor Detail

Node

public Node(ISourcePosition position,
            int id)
Method Detail

getPosition

public ISourcePosition getPosition()
Location of this node within the source

Specified by:
getPosition in interface ISourcePositionHolder

setPosition

public void setPosition(ISourcePosition position)
Specified by:
setPosition in interface ISourcePositionHolder

accept

public abstract Instruction accept(NodeVisitor visitor)

childNodes

public abstract java.util.List childNodes()

createList

protected static java.util.List createList(Node node)

createList

protected static java.util.List createList(Node node1,
                                           Node node2)

createList

protected static java.util.List createList(Node node1,
                                           Node node2,
                                           Node node3)

createList

protected static java.util.List createList(Node node1,
                                           Node node2,
                                           Node node3,
                                           Node node4)

toString

public java.lang.String toString()

getNodeName

protected java.lang.String getNodeName()

addComment

public void addComment(CommentNode comment)

addComments

public void addComments(java.util.Collection comments)

getComments

public java.util.Collection getComments()

hasComments

public boolean hasComments()

getPositionIncludingComments

public ISourcePosition getPositionIncludingComments()


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