Skip to content
Snippets Groups Projects

Handling "deprecated" status in doc comment (issue #371)

Merged Adam Knapp requested to merge deprecated into master
1 file
+ 10
0
Compare changes
  • Side-by-side
  • Inline
@@ -75,6 +75,7 @@ public class DocumentComment implements ILocateableNode {
private final List<String> urls = new ArrayList<String>();
private final Map<String,String> verdicts = new LinkedHashMap<String, String>();
private String version = null;
private boolean isDeprecated = false;
public DocumentComment(final String comment, final Token first, final Token last) {
this.comment = comment;
@@ -82,6 +83,14 @@ public class DocumentComment implements ILocateableNode {
this.last = last;
}
/**
* Returns whether the status tag contains the "deprecated" word
* @return whether the status tag contains the "deprecated" word
*/
public boolean isDeprecated() {
return isDeprecated;
}
public Token getFirstToken() {
return first;
}
@@ -702,6 +711,7 @@ public class DocumentComment implements ILocateableNode {
if (status == null) {
if (text != null) {
status = text.trim();
isDeprecated = status.toLowerCase().contains("depricated");
}
} else {
reportProblem("`@status' tag is specified more than once");
Loading