hudson.plugins.covcomplplot.analyzer
Class CloverBranchCoverageMethodHandler

java.lang.Object
  extended by hudson.plugins.covcomplplot.analyzer.AbstractMethodInfoHandler
      extended by hudson.plugins.covcomplplot.analyzer.CloverBranchCoverageMethodHandler

public class CloverBranchCoverageMethodHandler
extends AbstractMethodInfoHandler

Clover result handler. This class is responsible to read the clover result and make the MethodInfo list. In addition, some clover specific actions.

Author:
JunHo Yoon

Constructor Summary
CloverBranchCoverageMethodHandler()
           
 
Method Summary
 void checkBuild(hudson.model.AbstractBuild<?,?> build)
          Check if passed AbstractBuild contains valid hudson plugin result for this handler processing.
 java.lang.String getCustomJavaScript()
           
 java.lang.String getDescription()
          Get the description of Hudson plugin from which this handler get information
 java.lang.String getMethodUrlLocation(hudson.model.AbstractBuild<?,?> owner, MethodInfo methodInfo)
          Get method content URL.
protected  boolean isGetterSetter(MethodInfo method)
          Check if the give method is valid
protected  boolean isMethodValid(MethodInfo method, boolean excludeGetterSetter)
          Check if the method is valid.
 java.util.List<MethodInfo> process(hudson.model.AbstractBuild<?,?> build, boolean excludeGetterSetter, java.lang.String remoteDir, LoggerWrapper logger, Analyzer analyzer)
          Parse the Hudson plugin result and return the MethodInfo list.
 
Methods inherited from class hudson.plugins.covcomplplot.analyzer.AbstractMethodInfoHandler
checkBuildContainningBuildAction, getBuildArtifact, getCustomSourceViewBuildAction
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

CloverBranchCoverageMethodHandler

public CloverBranchCoverageMethodHandler()
Method Detail

process

public java.util.List<MethodInfo> process(hudson.model.AbstractBuild<?,?> build,
                                          boolean excludeGetterSetter,
                                          java.lang.String remoteDir,
                                          LoggerWrapper logger,
                                          Analyzer analyzer)
                                   throws InvalidHudsonProjectException
Description copied from class: AbstractMethodInfoHandler
Parse the Hudson plugin result and return the MethodInfo list.

Specified by:
process in class AbstractMethodInfoHandler
Parameters:
build - build info
excludeGetterSetter - whether getter/setter methods are included or not.
remoteDir - base directory of build.
logger - logger to be used
analyzer - information which analyzer is used.
Returns:
MethodInfo list parsed.
Throws:
InvalidHudsonProjectException

isMethodValid

protected boolean isMethodValid(MethodInfo method,
                                boolean excludeGetterSetter)
Check if the method is valid.

Overrides:
isMethodValid in class AbstractMethodInfoHandler
Parameters:
method - method to checked. if it's null, it's valid.
excludeGetterSetter - true if the getter/setter should be excluded.
Returns:
true if the method is valid

isGetterSetter

protected boolean isGetterSetter(MethodInfo method)
Check if the give method is valid

Overrides:
isGetterSetter in class AbstractMethodInfoHandler
Parameters:
method - method to be checked
Returns:
true if given method is valid

getCustomJavaScript

public java.lang.String getCustomJavaScript()
Overrides:
getCustomJavaScript in class AbstractMethodInfoHandler

getMethodUrlLocation

public java.lang.String getMethodUrlLocation(hudson.model.AbstractBuild<?,?> owner,
                                             MethodInfo methodInfo)
Description copied from class: AbstractMethodInfoHandler
Get method content URL. Each handler should implements this method to get the appropriate URL for each method source code.

Specified by:
getMethodUrlLocation in class AbstractMethodInfoHandler
Parameters:
owner - AbstractBuild instance against each methodInfo.
methodInfo - method.
Returns:
URL string from each hudson job URL base.

checkBuild

public void checkBuild(hudson.model.AbstractBuild<?,?> build)
                throws InvalidHudsonProjectException
Description copied from class: AbstractMethodInfoHandler
Check if passed AbstractBuild contains valid hudson plugin result for this handler processing. This method is invoked before the process method is called.

Specified by:
checkBuild in class AbstractMethodInfoHandler
Throws:
InvalidHudsonProjectException

getDescription

public java.lang.String getDescription()
Description copied from class: AbstractMethodInfoHandler
Get the description of Hudson plugin from which this handler get information

Specified by:
getDescription in class AbstractMethodInfoHandler
Returns:
description string


Copyright © 2010. All Rights Reserved.