org.spockframework.compiler.model
Class Node<P extends Node,A>

java.lang.Object
  extended by org.spockframework.compiler.model.Node<P,A>
Direct Known Subclasses:
Block, Field, Method, Spec

public abstract class Node<P extends Node,A>
extends java.lang.Object

Base class for all SpecL AST nodes.

Author:
Peter Niederwieser

Constructor Summary
Node(P parent, A ast)
           
 
Method Summary
abstract  void accept(ISpecVisitor visitor)
           
 A getAst()
          The Groovy AST representation of this node.
 java.lang.String getName()
           
 P getParent()
          The parent of this node.
 void setAst(A ast)
           
 void setName(java.lang.String name)
           
 java.lang.String toString()
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

Node

public Node(P parent,
            A ast)
Method Detail

getParent

public P getParent()
The parent of this node.

Returns:
the parent of this node

getAst

public A getAst()
The Groovy AST representation of this node.

Returns:
the Groovy AST representation of this node

setAst

public void setAst(A ast)

getName

public java.lang.String getName()

setName

public void setName(java.lang.String name)

toString

public java.lang.String toString()
Overrides:
toString in class java.lang.Object

accept

public abstract void accept(ISpecVisitor visitor)
                     throws java.lang.Exception
Throws:
java.lang.Exception


Copyright © 2013. All rights reserved