edu.usc.alfa.xalfa.ast
Class Node

java.lang.Object
  extended byedu.usc.alfa.xalfa.ast.Node
Direct Known Subclasses:
BehavioralConstraintNode, ConcreteBehaviorNode, DataConstraintNode, LinkNode, NamedNode, StructuralConstraintNode, TopologyConstraintNode

public abstract class Node
extends java.lang.Object

A node is the main target of visitation in a Visitor pattern. In xAlfa, the node interface is used to perform various kinds of analysis and checking on the style compositions and architectural assemblies.


Constructor Summary
protected Node(java.lang.String ID)
          Construct a node as a part of constructing its sub type
 
Method Summary
abstract  void accept(edu.usc.alfa.xalfa.visitor.NodeVisitor v)
          The visitor method to analyze xAlfa objects.
 boolean equals(java.lang.Object other)
           
 java.lang.String getID()
          Getter for property ID.
protected  java.lang.String getTabs(int level)
           
 int hashCode()
           
protected  java.lang.StringBuffer nodeSequenceString(Node[] nodes, java.lang.String header, boolean debug, int level)
           
protected  java.lang.StringBuffer nodeSequenceString(Node[] nodes, java.lang.String header, int level)
           
 java.lang.String toDebugString()
           
abstract  java.lang.String toDebugString(int level)
          Generate debug information for this node.
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

Node

protected Node(java.lang.String ID)
Construct a node as a part of constructing its sub type

Parameters:
ID - A unique identifier for the node
Method Detail

accept

public abstract void accept(edu.usc.alfa.xalfa.visitor.NodeVisitor v)
The visitor method to analyze xAlfa objects. This method is part of the Visitor pattern from GOF.

Parameters:
v - Node Visitor that wants to visit this node.

toDebugString

public abstract java.lang.String toDebugString(int level)
Generate debug information for this node. Nesting levels are provided so that hierarchical information can be easily debugged. Typically, debugging information includes values of various parameters and the debugging information for internal objects

Parameters:
level - The level of visual nesting to produce in the output
Returns:
A String containing debugging information about the object.

toDebugString

public java.lang.String toDebugString()
Returns:

getID

public final java.lang.String getID()
Getter for property ID.

Returns:
Value of property ID.

hashCode

public int hashCode()

equals

public boolean equals(java.lang.Object other)

nodeSequenceString

protected java.lang.StringBuffer nodeSequenceString(Node[] nodes,
                                                    java.lang.String header,
                                                    int level)

nodeSequenceString

protected java.lang.StringBuffer nodeSequenceString(Node[] nodes,
                                                    java.lang.String header,
                                                    boolean debug,
                                                    int level)

getTabs

protected java.lang.String getTabs(int level)