hudson.plugins.covcomplplot.model
Class MethodInfo

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

public class MethodInfo
extends Object
implements Comparable<MethodInfo>

Value class which contains each method info.

Author:
JunHo Yoon

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

Field Detail

sig

public String sig
Signature


compl

public int compl
Complexity


line

public int line
Line no


cst

public int cst
Covered Statement


st

public int st
Statement


path

public String path
File path


covered

public boolean covered
whether this method is called

Constructor Detail

MethodInfo

public MethodInfo(String path,
                  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

MethodInfo

public MethodInfo(String path,
                  String signature,
                  int complexity,
                  int lineno,
                  int covered,
                  int size)
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 String getFormattedCoverageRatio()
Get coverage ratio formatted by "#.##"

Returns:
formatted coverage ratio.

getDisplaySignature

public 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 String toString()
Overrides:
toString in class Object

compareTo

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

setCompl

public void setCompl(int compl)

getCompl

public int getCompl()

setSig

public void setSig(String sig)

getSig

public String getSig()

setPath

public void setPath(String path)

getPath

public String getPath()

increaseSizeAndCovered

public void increaseSizeAndCovered(int size,
                                   int covered)

increaseComplexity

public void increaseComplexity(int count)


Copyright © 2004-2011. All Rights Reserved.