diff options
author | Simon Brandhof <simon.brandhof@sonarsource.com> | 2014-06-02 18:48:29 +0200 |
---|---|---|
committer | Simon Brandhof <simon.brandhof@sonarsource.com> | 2014-06-02 18:49:25 +0200 |
commit | 61f8fe19627567e4cadeb4f24f20526462d5b33f (patch) | |
tree | db01e18ecb33fd42f7b9bd0e86f926898437f433 /sonar-plugin-api/src/main/java/org/sonar/api/utils/text | |
parent | 0d63b6ed63215a7d3afa7d6496c4d8c65ee22862 (diff) | |
download | sonarqube-61f8fe19627567e4cadeb4f24f20526462d5b33f.tar.gz sonarqube-61f8fe19627567e4cadeb4f24f20526462d5b33f.zip |
Add XmlWriter#end(String) for documentation purpose
Diffstat (limited to 'sonar-plugin-api/src/main/java/org/sonar/api/utils/text')
-rw-r--r-- | sonar-plugin-api/src/main/java/org/sonar/api/utils/text/XmlWriter.java | 15 |
1 files changed, 15 insertions, 0 deletions
diff --git a/sonar-plugin-api/src/main/java/org/sonar/api/utils/text/XmlWriter.java b/sonar-plugin-api/src/main/java/org/sonar/api/utils/text/XmlWriter.java index e9b53712bda..2744d4e01a3 100644 --- a/sonar-plugin-api/src/main/java/org/sonar/api/utils/text/XmlWriter.java +++ b/sonar-plugin-api/src/main/java/org/sonar/api/utils/text/XmlWriter.java @@ -73,6 +73,21 @@ public class XmlWriter { } } + /** + * Same as {@link #end()}. The parameter is unused. It's declared only to improve + * readability : + * <pre> + * xml.write("rules"); + * xml.write("rule"); + * // many other writes + * xml.end("rule"); + * xml.end("rules"); + * </pre> + */ + public XmlWriter end(String unused) { + return end(); + } + public XmlWriter prop(String nodeName, @Nullable String value) { if (value != null) { begin(nodeName).value(value).end(); |