Class PackageNode
- java.lang.Object
-
- com.parasoft.findings.jenkins.coverage.model.Node
-
- com.parasoft.findings.jenkins.coverage.model.PackageNode
-
- All Implemented Interfaces:
Serializable
public final class PackageNode extends Node
ANode
for a specific package. It converts a package structure to a corresponding path structure.- Author:
- Ullrich Hafner
- See Also:
- Serialized Form
-
-
Constructor Summary
Constructors Constructor Description PackageNode(String name)
Creates a new coverage item node with the given name.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description PackageNode
copy()
Creates a copy of this instance that has no children and no parent yet.ClassNode
createClassNode(String className)
Create a new class node with the given name and add it to the list of children.FileNode
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.ClassNode
findOrCreateClassNode(String className)
Searches for the specified class node.FileNode
findOrCreateFileNode(String fileName, edu.hm.hafner.util.TreeString relativePath)
Searches for the specified file node.String
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 Detail
-
PackageNode
public PackageNode(String name)
Creates a new coverage item node with the given name.- Parameters:
name
- the human-readable name of the node
-
-
Method Detail
-
copy
public PackageNode 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
public FileNode 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.- Parameters:
fileName
- the file namerelativePath
- the relative path of the file- Returns:
- the created and linked file node
-
findOrCreateFileNode
public FileNode findOrCreateFileNode(String fileName, edu.hm.hafner.util.TreeString relativePath)
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:
createFileNode(String, TreeString)
-
findOrCreateClassNode
public ClassNode findOrCreateClassNode(String className)
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(String)
-
createClassNode
public ClassNode createClassNode(String className)
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
-
-