hudson.plugins.findbugs.util.model
Class MavenModule

java.lang.Object
  extended by hudson.plugins.findbugs.util.model.AnnotationContainer
      extended by hudson.plugins.findbugs.util.model.MavenModule
All Implemented Interfaces:
AnnotationProvider, java.io.Serializable

public class MavenModule
extends AnnotationContainer

A serializable Java Bean class representing a maven module.

Author:
Ulli Hafner
See Also:
Serialized Form

Constructor Summary
MavenModule()
          Creates a new instance of MavenModule.
MavenModule(java.lang.String moduleName)
          Creates a new instance of MavenModule.
 
Method Summary
protected  void annotationAdded(FileAnnotation annotation)
          Creates the mapping of packages.
 int getAnnotationBound()
          Gets the maximum number of tasks in a package of this module.
 java.lang.String getError()
          Returns the error message for this module.
 WorkspaceFile getFile(java.lang.String fileName)
          Gets the file with the given name.
 java.util.Collection<WorkspaceFile> getFiles()
          Gets the files of this container that have annotations.
 JavaPackage getPackage(java.lang.String packageName)
          Gets the package with the given name.
 java.util.Collection<JavaPackage> getPackages()
          Gets the packages of this module that have annotations.
 boolean hasError()
          Return whether this module has an error message stored.
 void setError(java.lang.String error)
          Sets an error message that denotes that the creation of the module has been failed.
 
Methods inherited from class hudson.plugins.findbugs.util.model.AnnotationContainer
addAnnotation, addAnnotations, addAnnotations, addFile, getAnnotation, getAnnotation, getAnnotations, getAnnotations, getAnnotations, getName, getNumberOfAnnotations, getNumberOfAnnotations, getNumberOfAnnotations, getPackageCategoryName, getToolTip, hasAnnotations, hasAnnotations, hasAnnotations, rebuildMappings, setName
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

MavenModule

public MavenModule()
Creates a new instance of MavenModule. File handling is performed in this class since the files are already mapped in the modules of this project.


MavenModule

public MavenModule(java.lang.String moduleName)
Creates a new instance of MavenModule.

Parameters:
moduleName - name of the module
Method Detail

annotationAdded

protected void annotationAdded(FileAnnotation annotation)
Creates the mapping of packages.

Overrides:
annotationAdded in class AnnotationContainer
Parameters:
annotation - the added annotation

getPackages

public java.util.Collection<JavaPackage> getPackages()
Gets the packages of this module that have annotations.

Returns:
the packages with annotations

getPackage

public JavaPackage getPackage(java.lang.String packageName)
Gets the package with the given name.

Parameters:
packageName - the name of the package
Returns:
the package with the given name

getFiles

public java.util.Collection<WorkspaceFile> getFiles()
Gets the files of this container that have annotations.

Overrides:
getFiles in class AnnotationContainer
Returns:
the files with annotations

getFile

public WorkspaceFile getFile(java.lang.String fileName)
Gets the file with the given name.

Overrides:
getFile in class AnnotationContainer
Parameters:
fileName - the short name of the file
Returns:
the file with the given name

getAnnotationBound

public int getAnnotationBound()
Gets the maximum number of tasks in a package of this module.

Returns:
the maximum number of tasks

setError

public void setError(java.lang.String error)
Sets an error message that denotes that the creation of the module has been failed.

Parameters:
error - the error message

hasError

public boolean hasError()
Return whether this module has an error message stored.

Returns:
true if this module has an error message stored.

getError

public java.lang.String getError()
Returns the error message for this module.

Returns:
the error message for this module


Copyright © 2008. All Rights Reserved.