hudson.plugins.pmd.util.model
Class MavenModule

java.lang.Object
  extended by hudson.plugins.pmd.util.model.AnnotationContainer
      extended by hudson.plugins.pmd.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)
          Returns the file with the given name.
 java.util.Collection<WorkspaceFile> getFiles()
          Gets the files of this module that have annotations.
 java.lang.String getName()
          Returns the module name.
 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.
 void setName(java.lang.String name)
          Sets the name of this module.
 
Methods inherited from class hudson.plugins.pmd.util.model.AnnotationContainer
addAnnotation, addAnnotations, addAnnotations, getAnnotation, getAnnotation, getAnnotations, getAnnotations, getAnnotations, getNumberOfAnnotations, getNumberOfAnnotations, getNumberOfAnnotations, getToolTip, hasAnnotations, hasAnnotations, hasAnnotations, rebuildPriorities
 
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.


MavenModule

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

Parameters:
moduleName - name of the module
Method Detail

getName

public java.lang.String getName()
Returns the module name.

Returns:
the module name

setName

public void setName(java.lang.String name)
Sets the name of this module.

Parameters:
name - the name of this module

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 module that have annotations.

Returns:
the files with annotations

getFile

public WorkspaceFile getFile(java.lang.String fileName)
Returns the file with the given name. This method is only valid for single package modules.

Parameters:
fileName - the file name
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.