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
A Node for a specific package. It converts a package structure to a corresponding path structure.
Author:
Ullrich Hafner
See Also:
  • Constructor Details

    • 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 Details

    • 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 class Node must not be copied. All other immutable properties need to be copied one by one.
      Specified by:
      copy in class Node
      Returns:
      the copied node
    • 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 name
      relativePath - 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 name
      relativePath - the relative path of the file
      Returns:
      the existing or created file node
      See Also:
    • 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

      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
    • toString

      public String toString()
      Overrides:
      toString in class Node