net.sf.sasl.language.placeholder.syntax
Class ScriptNode

java.lang.Object
  extended by net.sf.sasl.language.placeholder.syntax.ASTNode
      extended by net.sf.sasl.language.placeholder.syntax.ScriptNode

public class ScriptNode
extends ASTNode

Defines a script node, which is the root node of each placeholder script.

Since:
0.0.1 (sasl-common-aspect-library)
Author:
Philipp Förmer

Field Summary
 
Fields inherited from class net.sf.sasl.language.placeholder.syntax.ASTNode
INDENT_PER_DEPTH, INDENT_STRING
 
Constructor Summary
ScriptNode()
          Creates an empty script node.
 
Method Summary
 void addChildNode(ASTNode childNode)
          Adds the given node as a child node of this node.
 List<ASTNode> getChildNodes()
          Returns a list of all child nodes of this node.
 boolean isLeafNode()
          Returns true if this node is a leaf node.
 String prettyPrint(int indent)
          Returns a human readable string representation of the tree spanned of by this node.
 String toString()
          Returns the same output as calling ASTNode.prettyPrint(int) with indent=0.
 
Methods inherited from class net.sf.sasl.language.placeholder.syntax.ASTNode
getParentNode, isRootNode, setParentNode
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

ScriptNode

public ScriptNode()
Creates an empty script node.

Since:
0.0.1 (sasl-common-aspect-library)
Method Detail

addChildNode

public void addChildNode(ASTNode childNode)
                  throws IllegalArgumentException
Adds the given node as a child node of this node. The method will update the childNodes parent node.

Parameters:
childNode - non null
Throws:
IllegalArgumentException - if child node is null
Since:
0.0.1 (sasl-common-aspect-library)

getChildNodes

public List<ASTNode> getChildNodes()
Description copied from class: ASTNode
Returns a list of all child nodes of this node.

Overrides:
getChildNodes in class ASTNode
Returns:
non null list.
See Also:
ASTNode.getChildNodes()

isLeafNode

public boolean isLeafNode()
Description copied from class: ASTNode
Returns true if this node is a leaf node. False else.

Overrides:
isLeafNode in class ASTNode
Returns:
true or false.
Since:
0.0.1 (sasl-common-aspect-library)
See Also:
ASTNode.isLeafNode()

toString

public String toString()
Description copied from class: ASTNode
Returns the same output as calling ASTNode.prettyPrint(int) with indent=0.

Overrides:
toString in class ASTNode
Since:
0.0.1 (sasl-common-aspect-library)
See Also:
ASTNode.toString()

prettyPrint

public String prettyPrint(int indent)
Description copied from class: ASTNode
Returns a human readable string representation of the tree spanned of by this node.

Specified by:
prettyPrint in class ASTNode
Parameters:
indent - how often ASTNode.INDENT_STRING should be printed in front of each new line at this tree depth.
Returns:
non null string
Since:
0.0.1 (sasl-common-aspect-library)
See Also:
ASTNode.prettyPrint(int)


Copyright © 2010. All Rights Reserved.