net.sourceforge.pmd.lang.dfa
Class Structure

java.lang.Object
  extended by net.sourceforge.pmd.lang.dfa.Structure

public class Structure
extends Object

Author:
raik

Structure contains only raw data. A set of nodes which represent a data flow and 2 stacks to link the nodes to each other.


Constructor Summary
Structure(DataFlowHandler dataFlowHandler)
           
 
Method Summary
 DataFlowNode createEndNode(int line)
           
 DataFlowNode createNewNode(Node node)
          This class encapsulates the access to the DataFlowNode class.
 DataFlowNode createStartNode(int line)
           
 String dump()
           
 List<StackObject> getBraceStack()
           
 List<StackObject> getContinueBreakReturnStack()
           
 DataFlowNode getFirst()
           
 DataFlowNode getLast()
           
 void pushOnStack(int type, DataFlowNode node)
          The braceStack contains all nodes which are important to link the data flow nodes.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

Structure

public Structure(DataFlowHandler dataFlowHandler)
Method Detail

createNewNode

public DataFlowNode createNewNode(Node node)
This class encapsulates the access to the DataFlowNode class. Is this worthwhile? TODO I think it's too confusing to have the DataFlowNode constructor add the created instance to the List. I think it'd be clearer if we did that more "procedurally", i.e., create the object, then add it to the list.


createStartNode

public DataFlowNode createStartNode(int line)

createEndNode

public DataFlowNode createEndNode(int line)

getLast

public DataFlowNode getLast()

getFirst

public DataFlowNode getFirst()

pushOnStack

public void pushOnStack(int type,
                        DataFlowNode node)
The braceStack contains all nodes which are important to link the data flow nodes. The cbrStack contains continue, break, and return nodes. There are 2 Stacks because the have to process differently.


getBraceStack

public List<StackObject> getBraceStack()

getContinueBreakReturnStack

public List<StackObject> getContinueBreakReturnStack()

dump

public String dump()
Returns:
formatted dump of the DFA Structure's


Copyright © 2002-2015 InfoEther. All Rights Reserved.