Class MethodNode

    • Constructor Detail

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

      • 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