hudson.plugins.tasks.util.model.DefaultAnnotationContainer Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of tasks Show documentation
Show all versions of tasks Show documentation
This plug-in scans the workspace files for open tasks
and generates a trend report.
package hudson.plugins.tasks.util.model;
import java.util.Collection;
/**
* A simple annotation container that stores a set of annotations.
*
* @author Ulli Hafner
*/
public class DefaultAnnotationContainer extends AnnotationContainer {
/** Dummy name for temporary containers. */
private static final String TEMPORARY = "temporary";
/** Unique identifier of this class. */
private static final long serialVersionUID = -7969178785228510814L;
/**
* Creates a new instance of {@link DefaultAnnotationContainer}.
*
* @param name
* the name of this container
*/
public DefaultAnnotationContainer(final String name) {
super(name, Hierarchy.PROJECT);
}
/**
* Creates a new instance of {@link DefaultAnnotationContainer}.
*
* @param name
* the name of this container
* @param annotations
* the annotations to be stored
*/
public DefaultAnnotationContainer(final String name, final Collection annotations) {
super(name, Hierarchy.PROJECT);
addAnnotations(annotations);
}
/**
* Creates a new instance of {@link DefaultAnnotationContainer}.
*
* @param annotations
* the annotations to be stored
*/
public DefaultAnnotationContainer(final Collection annotations) {
super(TEMPORARY, Hierarchy.PROJECT);
addAnnotations(annotations);
}
/**
* Rebuilds the priorities mapping.
*
* @return the created object
*/
private Object readResolve() {
setHierarchy(Hierarchy.PROJECT);
rebuildMappings();
return this;
}
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy