java.lang.Object
com.parasoft.findings.jenkins.coverage.model.Node
com.parasoft.findings.jenkins.coverage.model.MethodNode
All Implemented Interfaces:
Serializable

public final class MethodNode extends Node
A Node for a specific method.
Author:
Florian Orendi
See Also:
  • Constructor Details

    • MethodNode

      public MethodNode(String name, String signature)
      Creates a new method node with the given name. The line number will be set to 0.
      Parameters:
      name - The human-readable name of the node
      signature - The signature of the method
    • MethodNode

      public MethodNode(String name, String signature, int lineNumber)
      Creates a new item node with the given name.
      Parameters:
      name - The human-readable name of the node
      signature - The signature of the method
      lineNumber - The line number where the method begins (not including the method head)
  • Method Details

    • copy

      public Node 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
    • hasValidLineNumber

      public boolean hasValidLineNumber()
      Checks whether the line number is valid.
      Returns:
      true if the line number is valid, else false
    • getLineNumber

      public int getLineNumber()
    • getSignature

      public String getSignature()
    • equals

      public boolean equals(Object o)
      Overrides:
      equals in class Node
    • hashCode

      public int hashCode()
      Overrides:
      hashCode in class Node
    • toString

      public String toString()
      Overrides:
      toString in class Node