Class MethodCoverageImpl

    • Constructor Detail

      • MethodCoverageImpl

        public MethodCoverageImpl​(java.lang.String name,
                                  java.lang.String desc,
                                  java.lang.String signature)
        Creates a method coverage data object with the given parameters.
        Parameters:
        name - name of the method
        desc - method descriptor
        signature - generic signature or null
    • Method Detail

      • increment

        public void increment​(ICounter instructions,
                              ICounter branches,
                              int line)
        Description copied from class: SourceNodeImpl
        Increments instructions and branches by the given counter values. If a optional line number is specified the instructions and branches are added to the given line. The line counter is incremented accordingly.
        Overrides:
        increment in class SourceNodeImpl
        Parameters:
        instructions - instructions to add
        branches - branches to add
        line - optional line number or ISourceNode.UNKNOWN_LINE
      • incrementMethodCounter

        public void incrementMethodCounter()
        This method must be called exactly once after all instructions and branches have been incremented for this method coverage node.
      • getDesc

        public java.lang.String getDesc()
        Description copied from interface: IMethodCoverage
        Returns the descriptor of the method.
        Specified by:
        getDesc in interface IMethodCoverage
        Returns:
        descriptor
      • getSignature

        public java.lang.String getSignature()
        Description copied from interface: IMethodCoverage
        Returns the generic signature of the method if defined.
        Specified by:
        getSignature in interface IMethodCoverage
        Returns:
        generic signature or null