hudson.plugins.analysis.core
Class FilesParser

java.lang.Object
  extended by hudson.plugins.analysis.core.FilesParser
All Implemented Interfaces:
hudson.FilePath.FileCallable<ParserResult>, Serializable

public class FilesParser
extends Object
implements hudson.FilePath.FileCallable<ParserResult>

Parses files that match the specified pattern and creates a corresponding ParserResult with a collection of annotations.

Author:
Ulli Hafner
See Also:
Serialized Form

Constructor Summary
FilesParser(PluginLogger logger, String filePattern, AnnotationParser parser)
          Deprecated. Use FilesParser(String, String, AnnotationParser, boolean, boolean)
FilesParser(PluginLogger logger, String filePattern, AnnotationParser parser, boolean isMavenBuild)
          Deprecated. Use FilesParser(String, String, AnnotationParser, boolean, boolean)
FilesParser(PluginLogger logger, String filePattern, AnnotationParser parser, String moduleName)
          Deprecated. Use FilesParser(String, String, AnnotationParser, boolean, boolean)
FilesParser(StringPluginLogger logger, String filePattern, AnnotationParser parser, boolean shouldDetectModules, boolean isMavenBuild)
          Deprecated. Use FilesParser(String, String, AnnotationParser, boolean, boolean)
FilesParser(StringPluginLogger logger, String filePattern, AnnotationParser parser, String moduleName)
          Deprecated. Use FilesParser(String, String, AnnotationParser, boolean, boolean)
FilesParser(String pluginId, String filePattern, AnnotationParser parser, boolean shouldDetectModules, boolean isMavenBuild)
          Creates a new instance of FilesParser.
FilesParser(String pluginId, String filePattern, AnnotationParser parser, boolean shouldDetectModules, boolean isMavenBuild, boolean canResolveRelativePaths)
          Creates a new instance of FilesParser.
FilesParser(String pluginId, String filePattern, AnnotationParser parser, String moduleName)
          Creates a new instance of FilesParser.
 
Method Summary
 ParserResult invoke(File workspace, hudson.remoting.VirtualChannel channel)
          
protected  void log(String message)
          Logs the specified message.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

FilesParser

public FilesParser(String pluginId,
                   String filePattern,
                   AnnotationParser parser,
                   String moduleName)
Creates a new instance of FilesParser.

Parameters:
pluginId - the ID of the plug-in that uses this parser
filePattern - ant file-set pattern to scan for files to parse
parser - the parser to apply on the found files
moduleName - the name of the module to use for all files

FilesParser

public FilesParser(String pluginId,
                   String filePattern,
                   AnnotationParser parser,
                   boolean shouldDetectModules,
                   boolean isMavenBuild)
Creates a new instance of FilesParser.

Parameters:
pluginId - the ID of the plug-in that uses this parser
filePattern - ant file-set pattern to scan for files to parse
parser - the parser to apply on the found files
shouldDetectModules - determines whether modules should be detected from pom.xml or build.xml files
isMavenBuild - determines whether this build uses maven

FilesParser

public FilesParser(String pluginId,
                   String filePattern,
                   AnnotationParser parser,
                   boolean shouldDetectModules,
                   boolean isMavenBuild,
                   boolean canResolveRelativePaths)
Creates a new instance of FilesParser.

Parameters:
pluginId - the ID of the plug-in that uses this parser
filePattern - ant file-set pattern to scan for files to parse
parser - the parser to apply on the found files
shouldDetectModules - determines whether modules should be detected from pom.xml or build.xml files
isMavenBuild - determines whether this build uses maven
canResolveRelativePaths - determines whether relative paths in warnings should be resolved using a time expensive operation that scans the whole workspace for matching files.

FilesParser

@Deprecated
public FilesParser(PluginLogger logger,
                              String filePattern,
                              AnnotationParser parser,
                              boolean isMavenBuild)
Deprecated. Use FilesParser(String, String, AnnotationParser, boolean, boolean)

Creates a new instance of FilesParser.

Parameters:
logger - the logger
filePattern - ant file-set pattern to scan for files to parse
parser - the parser to apply on the found files
isMavenBuild - determines whether this build uses maven

FilesParser

@Deprecated
public FilesParser(PluginLogger logger,
                              String filePattern,
                              AnnotationParser parser,
                              String moduleName)
Deprecated. Use FilesParser(String, String, AnnotationParser, boolean, boolean)

Creates a new instance of FilesParser. Assumes that this is a Maven build with the specified module name.

Parameters:
logger - the logger
filePattern - ant file-set pattern to scan for files to parse
parser - the parser to apply on the found files
moduleName - the name of the module to use for all files

FilesParser

@Deprecated
public FilesParser(PluginLogger logger,
                              String filePattern,
                              AnnotationParser parser)
Deprecated. Use FilesParser(String, String, AnnotationParser, boolean, boolean)

Creates a new instance of FilesParser. Assumes that this is a Maven build with the specified module name.

Parameters:
logger - the logger
filePattern - ant file-set pattern to scan for files to parse
parser - the parser to apply on the found files

FilesParser

@Deprecated
public FilesParser(StringPluginLogger logger,
                              String filePattern,
                              AnnotationParser parser,
                              String moduleName)
Deprecated. Use FilesParser(String, String, AnnotationParser, boolean, boolean)

Creates a new instance of FilesParser.

Parameters:
logger - the logger
filePattern - ant file-set pattern to scan for files to parse
parser - the parser to apply on the found files
moduleName - the name of the module to use for all files

FilesParser

@Deprecated
public FilesParser(StringPluginLogger logger,
                              String filePattern,
                              AnnotationParser parser,
                              boolean shouldDetectModules,
                              boolean isMavenBuild)
Deprecated. Use FilesParser(String, String, AnnotationParser, boolean, boolean)

Creates a new instance of FilesParser.

Parameters:
logger - the logger
filePattern - ant file-set pattern to scan for files to parse
parser - the parser to apply on the found files
shouldDetectModules - determines whether modules should be detected from pom.xml or build.xml files
isMavenBuild - determines whether this build uses maven
Method Detail

log

protected void log(String message)
Logs the specified message.

Parameters:
message - the message

invoke

public ParserResult invoke(File workspace,
                           hudson.remoting.VirtualChannel channel)
                    throws IOException

Specified by:
invoke in interface hudson.FilePath.FileCallable<ParserResult>
Throws:
IOException


Copyright © 2004-2012 Hudson. All Rights Reserved.