@Override public AnnotationContainer getReferenceAnnotations() { return new DefaultAnnotationContainer(); }
/** * 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<FileAnnotation> annotations) { super(name, Hierarchy.PROJECT); addAnnotations(annotations); }
/** * @deprecated use {@link #createAttributeDetail(Run, DefaultAnnotationContainer, String, String, String)} instead */ @Deprecated protected AttributeDetail createAttributeDetail(final AbstractBuild<?, ?> owner, final DefaultAnnotationContainer annotations, final String displayName, final String header, final String defaultEncoding) { return new AttributeDetail(owner, this, annotations.getAnnotations(), defaultEncoding, displayName, header + " " + annotations.getName()); }
/** * Rebuilds the priorities mapping. * * @return the created object */ private Object readResolve() { setHierarchy(Hierarchy.PROJECT); rebuildMappings(); return this; } }
/** * Rebuilds the priorities mapping. * * @return the created object */ private Object readResolve() { setHierarchy(Hierarchy.PROJECT); rebuildMappings(); return this; } }
@Override public AnnotationContainer getReferenceAnnotations() { return new DefaultAnnotationContainer(); }
/** * Creates a generic detail tab with the specified link. * * @param owner * the build as owner of the detail page * @param annotations * the annotations to display * @param displayName * the name of the view * @param header * the bread crumb name * @param defaultEncoding * the default encoding to be used when reading and parsing files * @return the detail view */ protected AttributeDetail createAttributeDetail(final AbstractBuild<?, ?> owner, final DefaultAnnotationContainer annotations, final String displayName, final String header, final String defaultEncoding) { return new AttributeDetail(owner, this, annotations.getAnnotations(), defaultEncoding, displayName, header + " " + annotations.getName()); }
/** * Creates a new instance of {@link DefaultAnnotationContainer}. * * @param annotations * the annotations to be stored */ public DefaultAnnotationContainer(final Collection<FileAnnotation> annotations) { super(TEMPORARY, Hierarchy.PROJECT); addAnnotations(annotations); }
/** * Gets the type with the given name. * * @param type the type name * @return the type with the given name */ public DefaultAnnotationContainer getType(final String type) { if (annotationsByType.containsKey(type)) { return new DefaultAnnotationContainer(type, annotationsByType.get(type)); } throw new NoSuchElementException("Type not found: " + type); }
/** * Creates a generic detail tab with the specified link. * * @param owner * the build as owner of the detail page * @param annotations * the annotations to display * @param displayName * the name of the view * @param header * the bread crumb name * @param defaultEncoding * the default encoding to be used when reading and parsing files * @return the detail view */ protected AttributeDetail createAttributeDetail(@Nonnull final Run<?, ?> owner, final DefaultAnnotationContainer annotations, final String displayName, final String header, final String defaultEncoding) { if (owner instanceof AbstractBuild && Compatibility.isOverridden(DetailFactory.class, getClass(), "createAttributeDetail", AbstractBuild.class, DefaultAnnotationContainer.class, String.class, String.class, String.class)) { return createAttributeDetail((AbstractBuild<?, ?>) owner, annotations, displayName, header, defaultEncoding); } else { return new AttributeDetail(owner, this, annotations.getAnnotations(), defaultEncoding, displayName, header + " " + annotations.getName()); } }
/** * 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<FileAnnotation> annotations) { super(name, Hierarchy.PROJECT); addAnnotations(annotations); }
/** * Gets the category with the given name. * * @param category the category name * @return the category with the given name */ public DefaultAnnotationContainer getCategory(final String category) { if (annotationsByCategory.containsKey(category)) { return new DefaultAnnotationContainer(category, annotationsByCategory.get(category)); } throw new NoSuchElementException("Category not found: " + category); }
/** * Creates a new instance of {@link DefaultAnnotationContainer}. * * @param annotations * the annotations to be stored */ public DefaultAnnotationContainer(final Collection<FileAnnotation> annotations) { super(TEMPORARY, Hierarchy.PROJECT); addAnnotations(annotations); }
/** * Gets the category with the given name. * * @param category the category name * @return the category with the given name */ public DefaultAnnotationContainer getCategory(final String category) { if (annotationsByCategory.containsKey(category)) { return new DefaultAnnotationContainer(category, annotationsByCategory.get(category)); } throw new NoSuchElementException("Category not found: " + category); }
/** * Gets the type with the given name. * * @param type the type name * @return the type with the given name */ public DefaultAnnotationContainer getType(final String type) { if (annotationsByType.containsKey(type)) { return new DefaultAnnotationContainer(type, annotationsByType.get(type)); } throw new NoSuchElementException("Type not found: " + type); }
/** * Creates a history that has no previous and reference builds. * * @return a null history object */ private BuildHistory createNullHistory() { BuildHistory history = mock(BuildHistory.class); when(history.getReferenceAnnotations()).thenReturn(new DefaultAnnotationContainer()); return history; }
/** * Creates a history that has no previous and reference builds. * * @return a null history object */ private BuildHistory createNullHistory() { BuildHistory history = mock(BuildHistory.class); when(history.getReferenceAnnotations()).thenReturn(new DefaultAnnotationContainer()); return history; }
/** * Gets the type with the given hash code. * * @param hashCode the type hash code * @return the type with the given hash code */ public DefaultAnnotationContainer getType(final int hashCode) { if (typesByHashCode.containsKey(hashCode)) { Set<FileAnnotation> container = typesByHashCode.get(hashCode); FileAnnotation fileAnnotation = container.iterator().next(); return new DefaultAnnotationContainer(fileAnnotation.getType(), container); } throw new NoSuchElementException("Type by hashcode not found: " + hashCode); }
/** * Gets the category with the given hash code. * * @param hashCode the category hash code * @return the category with the given hash code */ public DefaultAnnotationContainer getCategory(final int hashCode) { if (categoriesByHashCode.containsKey(hashCode)) { Set<FileAnnotation> container = categoriesByHashCode.get(hashCode); FileAnnotation fileAnnotation = container.iterator().next(); return new DefaultAnnotationContainer(fileAnnotation.getCategory(), container); } throw new NoSuchElementException("Category by hashCode not found: " + hashCode); }
/** * Gets the category with the given hash code. * * @param hashCode the category hash code * @return the category with the given hash code */ public DefaultAnnotationContainer getCategory(final int hashCode) { if (categoriesByHashCode.containsKey(hashCode)) { Set<FileAnnotation> container = categoriesByHashCode.get(hashCode); FileAnnotation fileAnnotation = container.iterator().next(); return new DefaultAnnotationContainer(fileAnnotation.getCategory(), container); } throw new NoSuchElementException("Category by hashCode not found: " + hashCode); }