@Override protected Object createCollection(final Class type) { return new LineRangeList(); } }
@Override protected Object createCollection(final Class type) { return new LineRangeList(); } }
/** * Creates a new instance of <code>AbstractAnnotation</code>. * * @param message * the message of the warning * @param start * the first line of the line range * @param end * the last line of the line range * @param category * the category of the annotation * @param type * the type of the annotation */ @edu.umd.cs.findbugs.annotations.SuppressWarnings("ST") public AbstractAnnotation(final String message, final int start, final int end, final String category, final String type) { this.message = TreeString.of(StringUtils.strip(message)); this.category = StringUtils.defaultString(category); this.type = StringUtils.defaultString(type); key = currentKey++; lineRanges = new LineRangeList(); lineRanges.add(new LineRange(start, end)); primaryLineNumber = start; contextHashCode = currentKey; }
/** * Creates a new instance of <code>AbstractAnnotation</code>. * * @param message * the message of the warning * @param start * the first line of the line range * @param end * the last line of the line range * @param category * the category of the annotation * @param type * the type of the annotation */ @SuppressFBWarnings("ST") public AbstractAnnotation(final String message, final int start, final int end, final String category, final String type) { this.message = TreeString.of(StringUtils.strip(message)); this.category = defaultString(category); this.type = defaultString(type); key = currentKey++; lineRanges = new LineRangeList(); lineRanges.add(new LineRange(start, end)); primaryLineNumber = start; contextHashCode = currentKey; }
/** * Copy constructor: Creates a new instance of {@link AbstractAnnotation}. * * @param copy * the annotation to copy the values from */ @edu.umd.cs.findbugs.annotations.SuppressWarnings("ST") public AbstractAnnotation(final AbstractAnnotation copy) { key = currentKey++; message = TreeString.of(copy.getMessage()); priority = copy.getPriority(); primaryLineNumber = copy.getPrimaryLineNumber(); lineRanges = new LineRangeList(copy.getLineRanges()); contextHashCode = copy.getContextHashCode(); fileName = TreeString.of(copy.getFileName()); category = copy.getCategory(); type = copy.getType(); moduleName = TreeString.of(copy.getModuleName()); packageName = TreeString.of(copy.getPackageName()); }
/** * Copy constructor: Creates a new instance of {@link AbstractAnnotation}. * * @param copy * the annotation to copy the values from */ @SuppressFBWarnings("ST") public AbstractAnnotation(final FileAnnotation copy) { key = currentKey++; message = TreeString.of(copy.getMessage()); priority = copy.getPriority(); primaryLineNumber = copy.getPrimaryLineNumber(); lineRanges = new LineRangeList(copy.getLineRanges()); contextHashCode = copy.getContextHashCode(); fileName = TreeString.of(copy.getFileName()); category = copy.getCategory(); type = copy.getType(); moduleName = TreeString.of(copy.getModuleName()); packageName = TreeString.of(copy.getPackageName()); authorName = copy.getAuthorName(); authorEmail = copy.getAuthorEmail(); commitId = copy.getCommitId(); overridePackageCategoryName = TreeString.of(copy.getOverridePackageCategoryName()); }