Class PackageNode
java.lang.Object
com.parasoft.findings.jenkins.coverage.model.Node
com.parasoft.findings.jenkins.coverage.model.PackageNode
- All Implemented Interfaces:
Serializable
A
Node
for a specific package. It converts a package structure to a corresponding path structure.- Author:
- Ullrich Hafner
- See Also:
-
Constructor Summary
ConstructorDescriptionPackageNode
(String name) Creates a new coverage item node with the given name. -
Method Summary
Modifier and TypeMethodDescriptioncopy()
Creates a copy of this instance that has no children and no parent yet.createClassNode
(String className) Create a new class node with the given name and add it to the list of children.createFileNode
(String fileName, edu.hm.hafner.util.TreeString relativePath) Create a new file node with the given name and add it to the list of children.findOrCreateClassNode
(String className) Searches for the specified class node.findOrCreateFileNode
(String fileName, edu.hm.hafner.util.TreeString relativePath) Searches for the specified file node.toString()
Methods inherited from class com.parasoft.findings.jenkins.coverage.model.Node
addAllChildren, addAllValues, addChild, addValue, aggregateValues, computeDelta, containsMetric, copyNode, copyTree, copyTree, equals, filterByIndirectChanges, filterByModifiedFiles, filterByModifiedLines, filterTreeByIndirectChanges, filterTreeByModifiedFiles, filterTreeByModifiedLines, find, findByHashCode, findClass, findFile, findMethod, findPackage, getAll, getAllFileNodes, getAllMethodNodes, getChildren, getFiles, getMetric, getMetrics, getName, getParasoftToolName, getParent, getParentName, getSourceFolders, getTypedValue, getValue, getValueMetrics, getValues, hasChildren, hashCode, hasModifiedLines, hasParent, isEmpty, isRoot, matches, matches, merge, merge, removeChild, replaceValue, setParasoftToolName
-
Constructor Details
-
PackageNode
Creates a new coverage item node with the given name.- Parameters:
name
- the human-readable name of the node
-
-
Method Details
-
copy
Description copied from class:Node
Creates a copy of this instance that has no children and no parent yet. Node properties from the parent classNode
must not be copied. All other immutable properties need to be copied one by one. -
createFileNode
Create a new file node with the given name and add it to the list of children.- Parameters:
fileName
- the file namerelativePath
- the relative path of the file- Returns:
- the created and linked file node
-
findOrCreateFileNode
Searches for the specified file node. If the file node is not found then a new file node will be created and linked to this package node.- Parameters:
fileName
- the file namerelativePath
- the relative path of the file- Returns:
- the existing or created file node
- See Also:
-
findOrCreateClassNode
Searches for the specified class node. If the class node is not found then a new class node will be created and linked to this file node.- Parameters:
className
- the class name- Returns:
- the created and linked class node
- See Also:
-
createClassNode
Create a new class node with the given name and add it to the list of children.- Parameters:
className
- the class name- Returns:
- the created and linked class node
-
toString
-