hudson.plugins.covcomplplot.annalyzer
Class AbstractMethodInfoHandler

java.lang.Object
  extended by hudson.plugins.covcomplplot.annalyzer.AbstractMethodInfoHandler
Direct Known Subclasses:
CloverMethodHandler

public abstract class AbstractMethodInfoHandler
extends java.lang.Object

Abstract handler which is the superclass of all real hudson plugin handlers.

Author:
junoyoon@gmail.com

Constructor Summary
AbstractMethodInfoHandler()
           
 
Method Summary
abstract  void checkBuild(hudson.model.AbstractBuild<?,?> build)
          Check if passed build contains valid result for this handler processing.
protected  void checkBuildContainningBuildAction(hudson.model.AbstractBuild<?,?> build, java.lang.String buildActionName)
           
 org.dom4j.Document getBuildArtifact(hudson.model.AbstractBuild<?,?> build, java.lang.String fileName, Analyzer forWhat)
          Get build xml artifact
 java.lang.String getCustomJavaScript()
           
abstract  java.lang.String getDescription()
          Get the description of hudson plugin which this handler get information from.
abstract  java.lang.String getMethodUrlLocation(hudson.model.AbstractBuild<?,?> build, MethodInfo methodInfo)
          Get method content URL.
protected  boolean isMethodValid(MethodInfo method, boolean excludeGetterSetter)
          Check the method is valid or not.
abstract  java.util.List<MethodInfo> process(hudson.model.AbstractBuild<?,?> build, boolean excludeGetterSetter, java.lang.String workspaceDir, LoggerWrapper logger, Analyzer analyzer)
          Parse the hudson plugin info and return the MethodInfo list.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

AbstractMethodInfoHandler

public AbstractMethodInfoHandler()
Method Detail

process

public abstract java.util.List<MethodInfo> process(hudson.model.AbstractBuild<?,?> build,
                                                   boolean excludeGetterSetter,
                                                   java.lang.String workspaceDir,
                                                   LoggerWrapper logger,
                                                   Analyzer analyzer)
                                            throws InvalidHudsonProjectException
Parse the hudson plugin info and return the MethodInfo list.

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

getBuildArtifact

public org.dom4j.Document getBuildArtifact(hudson.model.AbstractBuild<?,?> build,
                                           java.lang.String fileName,
                                           Analyzer forWhat)
                                    throws InvalidHudsonProjectException
Get build xml artifact

Parameters:
build - build
fileName - file to be retrieve
forWhat - analyzer enum to be used for logging.
Returns:
xml document
Throws:
InvalidHudsonProjectException

isMethodValid

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

Parameters:
method - method to checked. if it's null, it's valid.
excludeGetterSetter - whether the getter/setter is excluded of not.
Returns:
true if the method is valid

getCustomJavaScript

public java.lang.String getCustomJavaScript()

getMethodUrlLocation

public abstract java.lang.String getMethodUrlLocation(hudson.model.AbstractBuild<?,?> build,
                                                      MethodInfo methodInfo)
Get method content URL. Each handler should implements this method to get the appropriate URL for each method source code.

Parameters:
build - build against each methodInfo.
methodInfo - methodInfo.
Returns:
URL statign from each hudson job URL.

checkBuild

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

Parameters:
build -
Throws:
InvalidHudsonProjectException

getDescription

public abstract java.lang.String getDescription()
Get the description of hudson plugin which this handler get information from.

Returns:

checkBuildContainningBuildAction

protected void checkBuildContainningBuildAction(hudson.model.AbstractBuild<?,?> build,
                                                java.lang.String buildActionName)
                                         throws InvalidHudsonProjectException
Throws:
InvalidHudsonProjectException


Copyright © 2010. All Rights Reserved.