sota.ast.nodes
Class FileNode

java.lang.Object
  extended by sota.ast.nodes.FileNode
All Implemented Interfaces:
java.lang.Comparable<FileNode>, IScopeNode
Direct Known Subclasses:
JavaFileNode

public abstract class FileNode
extends java.lang.Object
implements IScopeNode, java.lang.Comparable<FileNode>

AST-Knoten für eine geparste Datei


Field Summary
protected  ASTNode endNode
           
protected  java.lang.String fullName
           
protected  int idOffset
           
protected  boolean isDirty
           
protected  boolean isInstrumented
           
protected  boolean isParsedDirty
           
protected  Metrics metrics
           
protected  java.lang.String name
           
protected  int nrNodes
           
protected  java.lang.String packageName
           
protected  java.util.TreeSet<ASTClassNode> setOfClassNodes
           
protected  java.util.TreeSet<ASTFunctionNode> setOfFunctionNodes
           
protected  java.util.TreeSet<ASTScopeNode> setOfTopLevelScopeNodes
           
protected  ASTNode startNode
           
 
Constructor Summary
FileNode(java.lang.String name, int idOffset)
           
 
Method Summary
 void addClassNode(ASTClassNode cn)
           
 void addFunctionNode(ASTFunctionNode fn)
           
 void append(ASTNode n)
           
 void clearASCContent()
           
 int compareTo(FileNode file)
           
abstract  void createASCContent(int level)
           
 void createASCContentForScope(IScopeNode node, IScheme ischeme)
           
 java.util.TreeSet<ASTClassNode> getClassNodes()
           
 ASTNode getEndNode()
           
 FileNode getFileNode()
           
 int getFirstLineNr()
           
 java.lang.String getFullName()
           
 java.lang.String getFullQualifiedName()
           
 java.lang.String getFullyQualifiedName(boolean showPackage, boolean showFile)
           
 java.util.TreeSet<ASTFunctionNode> getFunctionNodes()
           
 java.lang.String getIDString()
           
 int getLastLineNr()
           
 ASTNode getLastNode()
           
 Metrics getMetrics()
           
 java.lang.String getName()
           
 int getNrNodes()
           
 java.lang.String getPackageName()
           
 IScopeNode getParent()
           
 java.lang.String getScope()
           
 ASTNode getStartNode()
           
 java.util.TreeSet<ASTScopeNode> getTopLevelScopeNodes()
           
 boolean isDirty()
           
 boolean isInstrumented()
           
 void isInstrumented(boolean b)
           
 boolean isParsedDirty()
           
 boolean isTopLevel()
           
 void print_indent(int indent)
           
 void print()
           
 void printCFG()
           
 void printConditions()
           
 void printFunctions(int indent)
           
 void printNodes()
           
 void resetHits()
           
 void setDirty(boolean b)
           
 void setEndNode(ASTNode dn)
           
 void setMetrics(Metrics metrics)
           
 void setPackageName(java.lang.String s)
           
 void setParsedDirty(boolean b)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

endNode

protected ASTNode endNode

fullName

protected java.lang.String fullName

idOffset

protected int idOffset

isDirty

protected boolean isDirty

isInstrumented

protected boolean isInstrumented

isParsedDirty

protected boolean isParsedDirty

metrics

protected Metrics metrics

name

protected java.lang.String name

nrNodes

protected int nrNodes

packageName

protected java.lang.String packageName

setOfClassNodes

protected java.util.TreeSet<ASTClassNode> setOfClassNodes

setOfFunctionNodes

protected java.util.TreeSet<ASTFunctionNode> setOfFunctionNodes

setOfTopLevelScopeNodes

protected java.util.TreeSet<ASTScopeNode> setOfTopLevelScopeNodes

startNode

protected ASTNode startNode
Constructor Detail

FileNode

public FileNode(java.lang.String name,
                int idOffset)
Method Detail

addClassNode

public void addClassNode(ASTClassNode cn)
Specified by:
addClassNode in interface IScopeNode

addFunctionNode

public void addFunctionNode(ASTFunctionNode fn)
Specified by:
addFunctionNode in interface IScopeNode

append

public void append(ASTNode n)

clearASCContent

public void clearASCContent()

compareTo

public int compareTo(FileNode file)
Specified by:
compareTo in interface java.lang.Comparable<FileNode>

createASCContent

public abstract void createASCContent(int level)
Specified by:
createASCContent in interface IScopeNode

createASCContentForScope

public void createASCContentForScope(IScopeNode node,
                                     IScheme ischeme)

getClassNodes

public java.util.TreeSet<ASTClassNode> getClassNodes()
Specified by:
getClassNodes in interface IScopeNode

getEndNode

public ASTNode getEndNode()
Specified by:
getEndNode in interface IScopeNode

getFileNode

public FileNode getFileNode()
Specified by:
getFileNode in interface IScopeNode

getFirstLineNr

public int getFirstLineNr()
Specified by:
getFirstLineNr in interface IScopeNode

getFullName

public java.lang.String getFullName()

getFullQualifiedName

public java.lang.String getFullQualifiedName()

getFullyQualifiedName

public java.lang.String getFullyQualifiedName(boolean showPackage,
                                              boolean showFile)
Specified by:
getFullyQualifiedName in interface IScopeNode

getFunctionNodes

public java.util.TreeSet<ASTFunctionNode> getFunctionNodes()
Specified by:
getFunctionNodes in interface IScopeNode

getIDString

public java.lang.String getIDString()
Specified by:
getIDString in interface IScopeNode

getLastLineNr

public int getLastLineNr()
Specified by:
getLastLineNr in interface IScopeNode

getLastNode

public ASTNode getLastNode()

getMetrics

public Metrics getMetrics()
Specified by:
getMetrics in interface IScopeNode

getName

public java.lang.String getName()
Specified by:
getName in interface IScopeNode

getNrNodes

public int getNrNodes()

getPackageName

public java.lang.String getPackageName()

getParent

public IScopeNode getParent()
Specified by:
getParent in interface IScopeNode

getScope

public java.lang.String getScope()
Specified by:
getScope in interface IScopeNode

getStartNode

public ASTNode getStartNode()
Specified by:
getStartNode in interface IScopeNode

getTopLevelScopeNodes

public java.util.TreeSet<ASTScopeNode> getTopLevelScopeNodes()

isDirty

public boolean isDirty()

isInstrumented

public boolean isInstrumented()

isInstrumented

public void isInstrumented(boolean b)

isParsedDirty

public boolean isParsedDirty()
Returns:
liefert true, wenn File instrumentiert geparst, und false, wenn File nicht instrumentiert oder Backup geparst wurde.

isTopLevel

public boolean isTopLevel()
Specified by:
isTopLevel in interface IScopeNode

print_indent

public void print_indent(int indent)

print

public void print()

printCFG

public void printCFG()

printConditions

public void printConditions()

printFunctions

public void printFunctions(int indent)

printNodes

public void printNodes()

resetHits

public void resetHits()

setDirty

public void setDirty(boolean b)

setEndNode

public void setEndNode(ASTNode dn)
Specified by:
setEndNode in interface IScopeNode

setMetrics

public void setMetrics(Metrics metrics)
Specified by:
setMetrics in interface IScopeNode

setPackageName

public void setPackageName(java.lang.String s)

setParsedDirty

public void setParsedDirty(boolean b)