hudson.plugins.pmd.util.model
Class JavaPackage

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

public class JavaPackage
extends AnnotationContainer

A serializable Java Bean class representing a Java package.

Author:
Ulli Hafner
See Also:
Serialized Form

Constructor Summary
JavaPackage(java.lang.String packageName)
          Creates a new instance of JavaPackage.
 
Method Summary
protected  void annotationAdded(FileAnnotation annotation)
          Creates the mapping of files.
 WorkspaceFile getFile(java.lang.String fileName)
          Gets the file with the given name.
 java.util.Collection<WorkspaceFile> getFiles()
          Gets the files of this package that have annotations.
 java.lang.String getName()
          Returns the name of this package.
 
Methods inherited from class hudson.plugins.pmd.util.model.AnnotationContainer
addAnnotation, addAnnotations, addAnnotations, getAnnotation, getAnnotation, getAnnotations, getAnnotations, getAnnotations, getNumberOfAnnotations, getNumberOfAnnotations, getNumberOfAnnotations, getPackageCategoryName, 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

JavaPackage

public JavaPackage(java.lang.String packageName)
Creates a new instance of JavaPackage.

Parameters:
packageName - the name of this package
Method Detail

getName

public java.lang.String getName()
Returns the name of this package.

Returns:
the name of this package

annotationAdded

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

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

getFiles

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

Returns:
the files with annotations

getFile

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

Parameters:
fileName - the short name of the file
Returns:
the file with the given name


Copyright © 2008. All Rights Reserved.