|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object | +--nice.StatementInfo
A Java source file analyzer.
It breaks a Java source file into individual statements. Statement delimiters are: the semicolon character and the open and close brackets.
Statements are grouped in bracket-delimited blocks. This creates a tree structure, where the root node is the source file itself and the leaves are the statements. The middle nodes are the statement blocks corresponding to :
Constructor Summary | |
protected |
StatementInfo(StatementInfo parent)
Creates a new StatementInfo. |
Method Summary | |
static StatementInfo |
analyze(java.lang.String fileName)
Analyze a Java source file to create a tree structure which represents the program structure. |
protected void |
changeLabel(java.lang.String newLabel)
Modifies the label associated to this StatementInfo. |
abstract StatementInfo |
childAt(int pos)
Returns the child StatementInfo at index pos. |
abstract int |
find(StatementInfo si)
Returns the index of a StatementInfo within the children of this node. |
java.lang.String |
label()
Returns the label associated to this node. |
abstract int |
numberOfChildren()
Returns the number of children this StatementInfo contains. |
StatementInfo |
parent()
Returns the parent of this node. |
Methods inherited from class java.lang.Object |
clone,
equals,
finalize,
getClass,
hashCode,
notify,
notifyAll,
toString,
wait,
wait,
wait |
Constructor Detail |
protected StatementInfo(StatementInfo parent)
Method Detail |
public static StatementInfo analyze(java.lang.String fileName)
fileName
- name of the Java source file to analyze.public java.lang.String label()
public StatementInfo parent()
public abstract int numberOfChildren()
public abstract StatementInfo childAt(int pos) throws java.lang.ArrayIndexOutOfBoundsException
public abstract int find(StatementInfo si)
protected void changeLabel(java.lang.String newLabel)
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |