hudson.plugins.covcomplplot.model
Class MethodInfo

java.lang.Object
  extended by hudson.plugins.covcomplplot.model.MethodInfo
All Implemented Interfaces:
java.lang.Comparable<MethodInfo>

public class MethodInfo
extends java.lang.Object
implements java.lang.Comparable<MethodInfo>

Value class which contains each method info.

Author:
JunHo Yoon

Field Summary
 int compl
          Complexity
 int cst
          Covered Statement
 int line
          Line no
 java.lang.String path
          File path
 java.lang.String sig
          Signature
 int st
          Statement
 
Constructor Summary
MethodInfo(java.lang.String path, java.lang.String signature, int complexity, int lineno)
          Constructor
 
Method Summary
 int compareTo(MethodInfo o)
           
 float getCoverageRatio()
          Get coverage ratio.
 java.lang.String getDisplaySignature()
          Return signature string cutting off more than 80 characters.
 java.lang.String getFormattedCoverageRatio()
          Get coverage ratio formatted by "#
 void increaseLine(boolean covered)
          Increase lines of code in this method.
 java.lang.String toString()
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

sig

public final java.lang.String sig
Signature


compl

public final int compl
Complexity


line

public final int line
Line no


cst

public int cst
Covered Statement


st

public int st
Statement


path

public final java.lang.String path
File path

Constructor Detail

MethodInfo

public MethodInfo(java.lang.String path,
                  java.lang.String signature,
                  int complexity,
                  int lineno)
Constructor

Parameters:
path - file path in which this method exists
signature - method signature
complexity - method complexity
lineno - method lines
Method Detail

getCoverageRatio

public float getCoverageRatio()
Get coverage ratio.

Returns:
Coverage ratio

getFormattedCoverageRatio

public java.lang.String getFormattedCoverageRatio()
Get coverage ratio formatted by "#.##"

Returns:
formatted coverage ratio.

getDisplaySignature

public java.lang.String getDisplaySignature()
Return signature string cutting off more than 80 characters.

Returns:
signature

increaseLine

public void increaseLine(boolean covered)
Increase lines of code in this method. If the true is passed, the covered line is increased as well.

Parameters:
covered - true if the line is covered.

toString

public java.lang.String toString()
Overrides:
toString in class java.lang.Object

compareTo

public int compareTo(MethodInfo o)
Specified by:
compareTo in interface java.lang.Comparable<MethodInfo>


Copyright © 2010. All Rights Reserved.