-
-
Notifications
You must be signed in to change notification settings - Fork 27
Expand file tree
/
Copy pathOutputCollector.java
More file actions
60 lines (52 loc) · 1.64 KB
/
OutputCollector.java
File metadata and controls
60 lines (52 loc) · 1.64 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
package analyzer;
import java.util.List;
/**
* This interface is used to collect analyzer output in the form of comments, tags and an optional summary.
*
* @see <a href="https://exercism.org/docs/building/tooling/analyzers/interface">The analyzer interface in the Exercism documentation</a>
*/
public interface OutputCollector {
/**
* The summary is a short description of the complete analysis result.
* It is {@code null} by default.
*
* @return The summary if set, {@code null} otherwise.
*/
String getSummary();
/**
* Set the summary of the analysis.
* If the summary was set previously, setting it again will overwrite it.
* The summary can be cleared by setting it to {@code null}.
*
* @param summary The summary to set.
*/
void setSummary(String summary);
/**
* Retrieve a copy of the comments added to this analysis.
* The resulting list is guaranteed to contain no duplicates.
*
* @return List of comments.
*/
List<Comment> getComments();
/**
* Retrieve a copy of the tags added to this analysis.
* The resulting list is guaranteed to contain no duplicates.
*
* @return List of tags.
*/
List<String> getTags();
/**
* Add a new comment to the analysis.
* This does nothing if a comment with the same values was added previously.
*
* @param comment The comment to add.
*/
void addComment(Comment comment);
/**
* Add a new tag to the analysis.
* This does nothing if the same tag was added previously.
*
* @param tag The tag to add.
*/
void addTag(String tag);
}