hudson.plugins.pmd.util.model
Interface AnnotationProvider

All Known Implementing Classes:
AbstractAnnotationsDetail, AnnotationContainer, AnnotationsBuildResult, AttributeDetail, BuildResult, DefaultAnnotationContainer, FileDetail, FixedWarningsDetail, JavaPackage, JavaProject, MavenModule, ModuleDetail, NewWarningsDetail, PackageDetail, PmdResult, PrioritiesDetail, WorkspaceFile

public interface AnnotationProvider

Provides an annotation counter for a model object.

Author:
Ulli Hafner

Method Summary
 FileAnnotation getAnnotation(long key)
          Returns the annotation with the specified key.
 FileAnnotation getAnnotation(java.lang.String key)
          Returns the annotation with the specified key.
 java.util.Collection<FileAnnotation> getAnnotations()
          Returns the annotations for this object.
 java.util.Collection<FileAnnotation> getAnnotations(Priority priority)
          Returns the annotations of the specified priority for this object.
 java.util.Collection<FileAnnotation> getAnnotations(java.lang.String priority)
          Returns the annotations of the specified priority for this object.
 int getNumberOfAnnotations()
          Returns the total number of annotations for this object.
 int getNumberOfAnnotations(Priority priority)
          Returns the total number of annotations of the specified priority for this object.
 int getNumberOfAnnotations(java.lang.String priority)
          Returns the annotations of the specified priority for this object.
 boolean hasAnnotations()
          Returns whether this objects has annotations.
 boolean hasAnnotations(Priority priority)
          Returns whether this objects has annotations with the specified priority.
 boolean hasAnnotations(java.lang.String priority)
          Returns whether this objects has annotations with the specified priority.
 boolean hasNoAnnotations()
          Returns whether this objects has no annotations.
 boolean hasNoAnnotations(Priority priority)
          Returns whether this objects has no annotations with the specified priority.
 boolean hasNoAnnotations(java.lang.String priority)
          Returns whether this objects has no annotations with the specified priority.
 

Method Detail

getNumberOfAnnotations

int getNumberOfAnnotations()
Returns the total number of annotations for this object.

Returns:
total number of annotations for this object

getNumberOfAnnotations

int getNumberOfAnnotations(Priority priority)
Returns the total number of annotations of the specified priority for this object.

Parameters:
priority - the priority
Returns:
total number of annotations of the specified priority for this object

getNumberOfAnnotations

int getNumberOfAnnotations(java.lang.String priority)
Returns the annotations of the specified priority for this object.

Parameters:
priority - the priority as a string object
Returns:
annotations of the specified priority for this object

hasAnnotations

boolean hasAnnotations()
Returns whether this objects has annotations.

Returns:
true if this objects has annotations.

hasAnnotations

boolean hasAnnotations(Priority priority)
Returns whether this objects has annotations with the specified priority.

Parameters:
priority - the priority
Returns:
true if this objects has annotations.

hasAnnotations

boolean hasAnnotations(java.lang.String priority)
Returns whether this objects has annotations with the specified priority.

Parameters:
priority - the priority as a string object
Returns:
true if this objects has annotations.

hasNoAnnotations

boolean hasNoAnnotations()
Returns whether this objects has no annotations.

Returns:
true if this objects has no annotations.

hasNoAnnotations

boolean hasNoAnnotations(Priority priority)
Returns whether this objects has no annotations with the specified priority.

Parameters:
priority - the priority
Returns:
true if this objects has no annotations.

hasNoAnnotations

boolean hasNoAnnotations(java.lang.String priority)
Returns whether this objects has no annotations with the specified priority.

Parameters:
priority - the priority as a string object
Returns:
true if this objects has no annotations.

getAnnotations

java.util.Collection<FileAnnotation> getAnnotations()
Returns the annotations for this object.

Returns:
annotations for this object

getAnnotations

java.util.Collection<FileAnnotation> getAnnotations(Priority priority)
Returns the annotations of the specified priority for this object.

Parameters:
priority - the priority
Returns:
annotations of the specified priority for this object

getAnnotations

java.util.Collection<FileAnnotation> getAnnotations(java.lang.String priority)
Returns the annotations of the specified priority for this object.

Parameters:
priority - the priority as a string object
Returns:
annotations of the specified priority for this object

getAnnotation

FileAnnotation getAnnotation(long key)
Returns the annotation with the specified key.

Parameters:
key - the key of the annotation
Returns:
the annotation with the specified key

getAnnotation

FileAnnotation getAnnotation(java.lang.String key)
Returns the annotation with the specified key.

Parameters:
key - the key of the annotation as a long value in string representation
Returns:
the annotation with the specified key


Copyright © 2008. All Rights Reserved.