Class ModuleNode
java.lang.Object
com.parasoft.findings.jenkins.coverage.model.Node
com.parasoft.findings.jenkins.coverage.model.ModuleNode
- All Implemented Interfaces:
Serializable
A
Node
which represents a module of a project.- Author:
- Melissa Bauer
- See Also:
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionvoid
Appends the specified source to the list of sources.copy()
Creates a copy of this instance that has no children and no parent yet.createPackageNode
(String packageName) Create a new package node with the given name and add it to the list of children.boolean
findOrCreatePackageNode
(String packageName) Searches for the specified package node.Returns a collection of source folders that contain the source code files of allfile nodes
.int
hashCode()
void
Splits flat packages into a package hierarchy.toString()
Methods inherited from class com.parasoft.findings.jenkins.coverage.model.Node
addAllChildren, addAllValues, addChild, addValue, aggregateValues, computeDelta, containsMetric, copyNode, copyTree, copyTree, filterByIndirectChanges, filterByModifiedFiles, filterByModifiedLines, filterTreeByIndirectChanges, filterTreeByModifiedFiles, filterTreeByModifiedLines, find, findByHashCode, findClass, findFile, findMethod, findPackage, getAll, getAllFileNodes, getAllMethodNodes, getChildren, getFiles, getMetric, getMetrics, getName, getParasoftToolName, getParent, getParentName, getTypedValue, getValue, getValueMetrics, getValues, hasChildren, hasModifiedLines, hasParent, isEmpty, isRoot, matches, matches, merge, merge, removeChild, replaceValue, setParasoftToolName
-
Constructor Details
-
ModuleNode
Creates a new module node with the given name.- Parameters:
name
- the name of the module
-
-
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. -
getSourceFolders
Description copied from class:Node
Returns a collection of source folders that contain the source code files of allfile nodes
.- Overrides:
getSourceFolders
in classNode
- Returns:
- a collection of source folders
-
addSource
Appends the specified source to the list of sources.- Parameters:
source
- the source to add
-
splitPackages
public void splitPackages()Splits flat packages into a package hierarchy. Changes the internal tree structure of package nodes in place.Examples:
-
A package name
"edu"
will produce a single node with the name"edu"
. -
A package name
"edu.hm.hafner"
will produce three package nodes, that are linked together, starting with the"edu"
package ("edu" -> "hm" -> "hafner"
).
-
A package name
-
createPackageNode
Create a new package node with the given name and add it to the list of children.- Parameters:
packageName
- the package name- Returns:
- the created and linked package node
-
findOrCreatePackageNode
Searches for the specified package node. If the package node is not found then a new package node will be created and linked to this module node.- Parameters:
packageName
- the package name- Returns:
- the existing or created package node
- See Also:
-
equals
-
hashCode
public int hashCode() -
toString
-