@Override public AnnotationContainer getReferenceAnnotations() { return new DefaultAnnotationContainer(); }
@Override public AnnotationContainer getReferenceAnnotations() { return new DefaultAnnotationContainer(); }
/** * 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); }
/** * 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 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); }
/** * 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); }
/** * Returns the annotations with {@link Priority#HIGH}. * * @return the annotations with {@link Priority#HIGH} */ public DefaultAnnotationContainer getHigh() { return new DefaultAnnotationContainer(Priority.HIGH.getLocalizedString(), getHighAnnotations()); }
/** * Returns the annotations with {@link Priority#LOW}. * * @return the annotations with {@link Priority#LOW} */ public DefaultAnnotationContainer getLow() { return new DefaultAnnotationContainer(Priority.LOW.getLocalizedString(), getLowAnnotations()); }
/** * Returns the annotations with {@link Priority#HIGH}. * * @return the annotations with {@link Priority#HIGH} */ public DefaultAnnotationContainer getHigh() { return new DefaultAnnotationContainer(Priority.HIGH.getLocalizedString(), getHighAnnotations()); }
/** * Returns the annotations with {@link Priority#NORMAL}. * * @return the annotations with {@link Priority#NORMAL} */ public DefaultAnnotationContainer getNormal() { return new DefaultAnnotationContainer(Priority.NORMAL.getLocalizedString(), getNormalAnnotations()); }
/** * Returns the annotations with {@link Priority#LOW}. * * @return the annotations with {@link Priority#LOW} */ public DefaultAnnotationContainer getLow() { return new DefaultAnnotationContainer(Priority.LOW.getLocalizedString(), getLowAnnotations()); }
/** * Returns the annotations with {@link Priority#NORMAL}. * * @return the annotations with {@link Priority#NORMAL} */ public DefaultAnnotationContainer getNormal() { return new DefaultAnnotationContainer(Priority.NORMAL.getLocalizedString(), getNormalAnnotations()); }
/** * Returns the annotations of the reference build. * * @return the annotations of the reference build */ public AnnotationContainer getReferenceAnnotations() { ResultAction<? extends BuildResult> action = getReferenceAction(); if (action != null) { return action.getResult().getContainer(); } return new DefaultAnnotationContainer(); }
/** * Returns the annotations of the reference build. * * @return the annotations of the reference build */ public AnnotationContainer getReferenceAnnotations() { ResultAction<? extends BuildResult> action = getReferenceAction(); if (action != null) { return action.getResult().getContainer(); } return new DefaultAnnotationContainer(); }