aboutsummaryrefslogtreecommitdiffstats
path: root/sonar-colorizer/src/main
diff options
context:
space:
mode:
authorDavid Gageot <david@gageot.net>2012-04-27 17:05:35 +0200
committerDavid Gageot <david@gageot.net>2012-04-27 17:05:35 +0200
commitb150482f1f4ea43bc42b324994d1d1e852de6320 (patch)
tree4638118d9a32405ad844c127f38e381d9ef37ae8 /sonar-colorizer/src/main
parent328e826a6a151128783ee7a3939e206202c6a990 (diff)
downloadsonarqube-b150482f1f4ea43bc42b324994d1d1e852de6320.tar.gz
sonarqube-b150482f1f4ea43bc42b324994d1d1e852de6320.zip
Code cleaning : Add @Override annotations
Diffstat (limited to 'sonar-colorizer/src/main')
-rw-r--r--sonar-colorizer/src/main/java/org/sonar/colorizer/CaseInsensitiveKeywordsTokenizer.java1
-rw-r--r--sonar-colorizer/src/main/java/org/sonar/colorizer/HtmlCodeBuilder.java1
-rw-r--r--sonar-colorizer/src/main/java/org/sonar/colorizer/HtmlRenderer.java1
-rw-r--r--sonar-colorizer/src/main/java/org/sonar/colorizer/InlineDocTokenizer.java1
-rw-r--r--sonar-colorizer/src/main/java/org/sonar/colorizer/KeywordsTokenizer.java2
-rw-r--r--sonar-colorizer/src/main/java/org/sonar/colorizer/MultilinesDocTokenizer.java1
-rw-r--r--sonar-colorizer/src/main/java/org/sonar/colorizer/NotThreadSafeTokenizer.java1
-rw-r--r--sonar-colorizer/src/main/java/org/sonar/colorizer/RegexpTokenizer.java1
8 files changed, 9 insertions, 0 deletions
diff --git a/sonar-colorizer/src/main/java/org/sonar/colorizer/CaseInsensitiveKeywordsTokenizer.java b/sonar-colorizer/src/main/java/org/sonar/colorizer/CaseInsensitiveKeywordsTokenizer.java
index f7111c3b6e6..c5129b80ded 100644
--- a/sonar-colorizer/src/main/java/org/sonar/colorizer/CaseInsensitiveKeywordsTokenizer.java
+++ b/sonar-colorizer/src/main/java/org/sonar/colorizer/CaseInsensitiveKeywordsTokenizer.java
@@ -33,6 +33,7 @@ public class CaseInsensitiveKeywordsTokenizer extends KeywordsTokenizer {
setCaseInsensitive(true);
}
+ @Override
public KeywordsTokenizer clone() {
KeywordsTokenizer clone = super.clone();
clone.setCaseInsensitive(true);
diff --git a/sonar-colorizer/src/main/java/org/sonar/colorizer/HtmlCodeBuilder.java b/sonar-colorizer/src/main/java/org/sonar/colorizer/HtmlCodeBuilder.java
index 7f7b4a281c6..ed6d6b4c832 100644
--- a/sonar-colorizer/src/main/java/org/sonar/colorizer/HtmlCodeBuilder.java
+++ b/sonar-colorizer/src/main/java/org/sonar/colorizer/HtmlCodeBuilder.java
@@ -56,6 +56,7 @@ public class HtmlCodeBuilder implements Appendable {
colorizedCode.append(htmlTag);
}
+ @Override
public String toString() {
return colorizedCode.toString();
}
diff --git a/sonar-colorizer/src/main/java/org/sonar/colorizer/HtmlRenderer.java b/sonar-colorizer/src/main/java/org/sonar/colorizer/HtmlRenderer.java
index 0368b26a94d..af9c2d81f02 100644
--- a/sonar-colorizer/src/main/java/org/sonar/colorizer/HtmlRenderer.java
+++ b/sonar-colorizer/src/main/java/org/sonar/colorizer/HtmlRenderer.java
@@ -38,6 +38,7 @@ public class HtmlRenderer extends Renderer {
this(HtmlOptions.DEFAULT);
}
+ @Override
public String render(Reader code, List<? extends Channel<HtmlCodeBuilder>> tokenizers) {
try {
List<Channel<HtmlCodeBuilder>> allTokenizers = new ArrayList<Channel<HtmlCodeBuilder>>();
diff --git a/sonar-colorizer/src/main/java/org/sonar/colorizer/InlineDocTokenizer.java b/sonar-colorizer/src/main/java/org/sonar/colorizer/InlineDocTokenizer.java
index 0f9b9e5773e..19bfe7747e4 100644
--- a/sonar-colorizer/src/main/java/org/sonar/colorizer/InlineDocTokenizer.java
+++ b/sonar-colorizer/src/main/java/org/sonar/colorizer/InlineDocTokenizer.java
@@ -37,6 +37,7 @@ public abstract class InlineDocTokenizer extends Tokenizer {
this.startToken = startToken.toCharArray();
}
+ @Override
public boolean consume(CodeReader code, HtmlCodeBuilder codeBuilder) {
if (code.peek() == startToken[0] && Arrays.equals(code.peek(startToken.length), startToken)) {
codeBuilder.appendWithoutTransforming(tagBefore);
diff --git a/sonar-colorizer/src/main/java/org/sonar/colorizer/KeywordsTokenizer.java b/sonar-colorizer/src/main/java/org/sonar/colorizer/KeywordsTokenizer.java
index e2ed24ecd4c..0feab07b363 100644
--- a/sonar-colorizer/src/main/java/org/sonar/colorizer/KeywordsTokenizer.java
+++ b/sonar-colorizer/src/main/java/org/sonar/colorizer/KeywordsTokenizer.java
@@ -59,6 +59,7 @@ public class KeywordsTokenizer extends NotThreadSafeTokenizer {
this.matcher = Pattern.compile(DEFAULT_REGEX).matcher("");
}
+ @Override
public boolean consume(CodeReader code, HtmlCodeBuilder codeBuilder) {
if (code.popTo(matcher, tmpBuilder) > 0) {
if (isKeyword(tmpBuilder.toString())) {
@@ -87,6 +88,7 @@ public class KeywordsTokenizer extends NotThreadSafeTokenizer {
this.caseInsensitive = caseInsensitive;
}
+ @Override
public KeywordsTokenizer clone() {
KeywordsTokenizer clone = new KeywordsTokenizer(tagBefore, tagAfter, keywords, matcher.pattern().pattern());
clone.caseInsensitive = caseInsensitive;
diff --git a/sonar-colorizer/src/main/java/org/sonar/colorizer/MultilinesDocTokenizer.java b/sonar-colorizer/src/main/java/org/sonar/colorizer/MultilinesDocTokenizer.java
index 779ebb02fe1..12795af506f 100644
--- a/sonar-colorizer/src/main/java/org/sonar/colorizer/MultilinesDocTokenizer.java
+++ b/sonar-colorizer/src/main/java/org/sonar/colorizer/MultilinesDocTokenizer.java
@@ -55,6 +55,7 @@ public class MultilinesDocTokenizer extends Tokenizer {
startToken)));
}
+ @Override
public boolean consume(CodeReader code, HtmlCodeBuilder codeBuilder) {
if (hasNextToken(code, codeBuilder)) {
codeBuilder.appendWithoutTransforming(tagBefore);
diff --git a/sonar-colorizer/src/main/java/org/sonar/colorizer/NotThreadSafeTokenizer.java b/sonar-colorizer/src/main/java/org/sonar/colorizer/NotThreadSafeTokenizer.java
index db935b15ab7..7c020274a1c 100644
--- a/sonar-colorizer/src/main/java/org/sonar/colorizer/NotThreadSafeTokenizer.java
+++ b/sonar-colorizer/src/main/java/org/sonar/colorizer/NotThreadSafeTokenizer.java
@@ -26,5 +26,6 @@ package org.sonar.colorizer;
*/
public abstract class NotThreadSafeTokenizer extends Tokenizer implements Cloneable {
+ @Override
public abstract NotThreadSafeTokenizer clone();
}
diff --git a/sonar-colorizer/src/main/java/org/sonar/colorizer/RegexpTokenizer.java b/sonar-colorizer/src/main/java/org/sonar/colorizer/RegexpTokenizer.java
index 84de5df5f7f..92139c083e7 100644
--- a/sonar-colorizer/src/main/java/org/sonar/colorizer/RegexpTokenizer.java
+++ b/sonar-colorizer/src/main/java/org/sonar/colorizer/RegexpTokenizer.java
@@ -57,6 +57,7 @@ public class RegexpTokenizer extends NotThreadSafeTokenizer{
return false;
}
+ @Override
public RegexpTokenizer clone() {
return new RegexpTokenizer(tagBefore, tagAfter, matcher.pattern().pattern());
}