sota.ast.nodes
Class FileNode
java.lang.Object
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
Constructor Summary |
FileNode(java.lang.String name,
int idOffset)
|
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
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
FileNode
public FileNode(java.lang.String name,
int idOffset)
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)