diff --git a/Examples/test-suite/java/commentParser.java b/Examples/test-suite/java/CommentParser.java similarity index 82% rename from Examples/test-suite/java/commentParser.java rename to Examples/test-suite/java/CommentParser.java index 390bda8a8..1d61f16b1 100644 --- a/Examples/test-suite/java/commentParser.java +++ b/Examples/test-suite/java/CommentParser.java @@ -11,8 +11,8 @@ import java.io.FileOutputStream; import java.io.IOException; -public class commentParser { - static HashMap parsedComments = new HashMap(); +public class CommentParser { + private static Map m_parsedComments = new HashMap(); public static boolean start(RootDoc root) { @@ -24,31 +24,31 @@ public class commentParser { for (ClassDoc classDoc : root.classes()) { if (classDoc.getRawCommentText().length() > 0) - parsedComments.put(classDoc.qualifiedName(), classDoc.getRawCommentText()); + m_parsedComments.put(classDoc.qualifiedName(), classDoc.getRawCommentText()); for (FieldDoc f : classDoc.enumConstants()) { if (f.getRawCommentText().length() > 0) - parsedComments.put(f.qualifiedName(), f.getRawCommentText()); + m_parsedComments.put(f.qualifiedName(), f.getRawCommentText()); } for (FieldDoc f : classDoc.fields()) { if (f.getRawCommentText().length() > 0) - parsedComments.put(f.qualifiedName(), f.getRawCommentText()); + m_parsedComments.put(f.qualifiedName(), f.getRawCommentText()); } for (MethodDoc m : classDoc.methods()) { if (m.getRawCommentText().length() > 0) - parsedComments.put(m.toString(), m.getRawCommentText()); + m_parsedComments.put(m.toString(), m.getRawCommentText()); } } return true; } - public static int check(HashMap wantedComments) { + public int check(Map wantedComments) { int errorCount=0; - Iterator< Entry > it = parsedComments.entrySet().iterator(); + Iterator> it = m_parsedComments.entrySet().iterator(); - while (it.hasNext()) - { + while (it.hasNext()) { + Entry e = (Entry) it.next(); String actualStr = e.getValue(); String wantedStr = wantedComments.get(e.getKey()); @@ -102,14 +102,14 @@ public class commentParser { } } - if (parsedComments.size() != wantedComments.size()) { + if (m_parsedComments.size() != wantedComments.size()) { System.out.println("Mismatch in the number of comments!\n Expected: " + wantedComments.size() + "\n Parsed: " + - parsedComments.size()); + m_parsedComments.size()); System.out.println("Expected keys: "); printKeys(wantedComments); System.out.println("Parsed keys: "); - printKeys(parsedComments); + printKeys(m_parsedComments); errorCount++; } @@ -118,7 +118,8 @@ public class commentParser { } - private static void printKeys(Map map) { + private void printKeys(Map map) { + Set keys = map.keySet(); for (String key : keys) { System.out.println(" " + key); @@ -127,9 +128,11 @@ public class commentParser { public static void printCommentListForJavaSource() { - Iterator< Entry > it = parsedComments.entrySet().iterator(); - while (it.hasNext()) - { + + Iterator< Entry > it = m_parsedComments.entrySet().iterator(); + + while (it.hasNext()) { + Entry e = (Entry) it.next(); String commentText = e.getValue(); commentText = commentText.replace("\\", "\\\\"); @@ -143,12 +146,12 @@ public class commentParser { public static void main(String argv[]) { if (argv.length<1) { - System.out.format("Usage:\n\tcommentParsing \n"); + System.out.format("Usage:\n\tCommentParser \n"); System.exit(1); } com.sun.tools.javadoc.Main.execute("The comment parser program", - "commentParser", new String[]{"-quiet", argv[0]}); + "CommentParser", new String[]{"-quiet", argv[0]}); // if we are run as standalone app, print the list of found comments as it would appear in java source diff --git a/Examples/test-suite/java/doxygen_basic_notranslate_runme.java b/Examples/test-suite/java/doxygen_basic_notranslate_runme.java index 711cfbb88..d1c433545 100644 --- a/Examples/test-suite/java/doxygen_basic_notranslate_runme.java +++ b/Examples/test-suite/java/doxygen_basic_notranslate_runme.java @@ -19,9 +19,10 @@ public class doxygen_basic_notranslate_runme { Here we are using internal javadoc tool, it accepts the name of the class as paramterer, and calls the start() method of that class with parsed information. */ - commentParser parser = new commentParser(); + CommentParser parser = new CommentParser(); com.sun.tools.javadoc.Main.execute("doxygen_basic_notranslate runtime test", - "commentParser", new String[]{"-quiet", "doxygen_basic_notranslate"}); + "CommentParser", + new String[]{"-quiet", "doxygen_basic_notranslate"}); HashMap wantedComments = new HashMap(); wantedComments.put("doxygen_basic_notranslate.doxygen_basic_notranslate.function3(int)", diff --git a/Examples/test-suite/java/doxygen_basic_translate_runme.java b/Examples/test-suite/java/doxygen_basic_translate_runme.java index 946988c57..395e61139 100644 --- a/Examples/test-suite/java/doxygen_basic_translate_runme.java +++ b/Examples/test-suite/java/doxygen_basic_translate_runme.java @@ -19,9 +19,10 @@ public class doxygen_basic_translate_runme { Here we are using internal javadoc tool, it accepts the name of the class as paramterer, and calls the start() method of that class with parsed information. */ - commentParser parser = new commentParser(); + CommentParser parser = new CommentParser(); com.sun.tools.javadoc.Main.execute("doxygen_basic_translate runtime test", - "commentParser", new String[]{"-quiet", "doxygen_basic_translate"}); + "CommentParser", + new String[]{"-quiet", "doxygen_basic_translate"}); HashMap wantedComments = new HashMap(); diff --git a/Examples/test-suite/java/doxygen_misc_constructs_runme.java b/Examples/test-suite/java/doxygen_misc_constructs_runme.java index 7f29f9b5f..ae9cc442f 100644 --- a/Examples/test-suite/java/doxygen_misc_constructs_runme.java +++ b/Examples/test-suite/java/doxygen_misc_constructs_runme.java @@ -19,9 +19,10 @@ public class doxygen_misc_constructs_runme { Here we are using internal javadoc tool, it accepts the name of the class as paramterer, and calls the start() method of that class with parsed information. */ - commentParser parser = new commentParser(); + CommentParser parser = new CommentParser(); com.sun.tools.javadoc.Main.execute("doxygen_misc_constructs runtime test", - "commentParser", new String[]{"-quiet", "doxygen_misc_constructs"}); + "CommentParser", + new String[]{"-quiet", "doxygen_misc_constructs"}); HashMap wantedComments = new HashMap(); diff --git a/Examples/test-suite/java/doxygen_parsing_enums_proper_runme.java b/Examples/test-suite/java/doxygen_parsing_enums_proper_runme.java index b96ee66ea..a8527e364 100644 --- a/Examples/test-suite/java/doxygen_parsing_enums_proper_runme.java +++ b/Examples/test-suite/java/doxygen_parsing_enums_proper_runme.java @@ -19,9 +19,10 @@ public class doxygen_parsing_enums_proper_runme { Here we are using internal javadoc tool, it accepts the name of the class as paramterer, and calls the start() method of that class with parsed information. */ - commentParser parser = new commentParser(); + CommentParser parser = new CommentParser(); com.sun.tools.javadoc.Main.execute("doxygen_parsing_enums_proper runtime test", - "commentParser", new String[]{"-quiet", "doxygen_parsing_enums_proper"}); + "CommentParser", + new String[]{"-quiet", "doxygen_parsing_enums_proper"}); HashMap wantedComments = new HashMap(); diff --git a/Examples/test-suite/java/doxygen_parsing_enums_simple_runme.java b/Examples/test-suite/java/doxygen_parsing_enums_simple_runme.java index cd97c9a4f..f68fff151 100644 --- a/Examples/test-suite/java/doxygen_parsing_enums_simple_runme.java +++ b/Examples/test-suite/java/doxygen_parsing_enums_simple_runme.java @@ -19,9 +19,10 @@ public class doxygen_parsing_enums_simple_runme { Here we are using internal javadoc tool, it accepts the name of the class as paramterer, and calls the start() method of that class with parsed information. */ - commentParser parser = new commentParser(); + CommentParser parser = new CommentParser(); com.sun.tools.javadoc.Main.execute("doxygen_parsing_enums_simple runtime test", - "commentParser", new String[]{"-quiet", "doxygen_parsing_enums_simple"}); + "CommentParser", + new String[]{"-quiet", "doxygen_parsing_enums_simple"}); HashMap wantedComments = new HashMap(); diff --git a/Examples/test-suite/java/doxygen_parsing_enums_typesafe_runme.java b/Examples/test-suite/java/doxygen_parsing_enums_typesafe_runme.java index 85ac15fe8..7c7f05ccc 100644 --- a/Examples/test-suite/java/doxygen_parsing_enums_typesafe_runme.java +++ b/Examples/test-suite/java/doxygen_parsing_enums_typesafe_runme.java @@ -19,9 +19,10 @@ public class doxygen_parsing_enums_typesafe_runme { Here we are using internal javadoc tool, it accepts the name of the class as paramterer, and calls the start() method of that class with parsed information. */ - commentParser parser = new commentParser(); + CommentParser parser = new CommentParser(); com.sun.tools.javadoc.Main.execute("doxygen_parsing_enums_typesafe runtime test", - "commentParser", new String[]{"-quiet", "doxygen_parsing_enums_typesafe"}); + "CommentParser", + new String[]{"-quiet", "doxygen_parsing_enums_typesafe"}); HashMap wantedComments = new HashMap(); diff --git a/Examples/test-suite/java/doxygen_parsing_enums_typeunsafe_runme.java b/Examples/test-suite/java/doxygen_parsing_enums_typeunsafe_runme.java index 6f453060d..8c7dfeda0 100644 --- a/Examples/test-suite/java/doxygen_parsing_enums_typeunsafe_runme.java +++ b/Examples/test-suite/java/doxygen_parsing_enums_typeunsafe_runme.java @@ -19,9 +19,10 @@ public class doxygen_parsing_enums_typeunsafe_runme { Here we are using internal javadoc tool, it accepts the name of the class as paramterer, and calls the start() method of that class with parsed information. */ - commentParser parser = new commentParser(); + CommentParser parser = new CommentParser(); com.sun.tools.javadoc.Main.execute("doxygen_parsing_enums_typeunsafe runtime test", - "commentParser", new String[]{"-quiet", "doxygen_parsing_enums_typeunsafe"}); + "CommentParser", + new String[]{"-quiet", "doxygen_parsing_enums_typeunsafe"}); HashMap wantedComments = new HashMap(); diff --git a/Examples/test-suite/java/doxygen_parsing_runme.java b/Examples/test-suite/java/doxygen_parsing_runme.java index 322a4e42c..ec9390849 100644 --- a/Examples/test-suite/java/doxygen_parsing_runme.java +++ b/Examples/test-suite/java/doxygen_parsing_runme.java @@ -19,9 +19,10 @@ public class doxygen_parsing_runme { Here we are using internal javadoc tool, it accepts the name of the class as paramterer, and calls the start() method of that class with parsed information. */ - commentParser parser = new commentParser(); + CommentParser parser = new CommentParser(); com.sun.tools.javadoc.Main.execute("doxygen_parsing runtime test", - "commentParser", new String[]{"-quiet", "doxygen_parsing"}); + "CommentParser", + new String[]{"-quiet", "doxygen_parsing"}); HashMap wantedComments = new HashMap(); diff --git a/Examples/test-suite/java/doxygen_translate_all_tags_runme.java b/Examples/test-suite/java/doxygen_translate_all_tags_runme.java index 37d60ff81..69a1169ca 100644 --- a/Examples/test-suite/java/doxygen_translate_all_tags_runme.java +++ b/Examples/test-suite/java/doxygen_translate_all_tags_runme.java @@ -19,9 +19,10 @@ public class doxygen_translate_all_tags_runme { Here we are using internal javadoc tool, it accepts the name of the class as paramterer, and calls the start() method of that class with parsed information. */ - commentParser parser = new commentParser(); + CommentParser parser = new CommentParser(); com.sun.tools.javadoc.Main.execute("doxygen_translate_all_tags runtime test", - "commentParser", new String[]{"-quiet", "doxygen_translate_all_tags"}); + "CommentParser", + new String[]{"-quiet", "doxygen_translate_all_tags"}); HashMap wantedComments = new HashMap(); diff --git a/Examples/test-suite/java/doxygen_translate_links_runme.java b/Examples/test-suite/java/doxygen_translate_links_runme.java index 080063430..6d74e16fe 100644 --- a/Examples/test-suite/java/doxygen_translate_links_runme.java +++ b/Examples/test-suite/java/doxygen_translate_links_runme.java @@ -19,9 +19,10 @@ public class doxygen_translate_links_runme { Here we are using internal javadoc tool, it accepts the name of the class as paramterer, and calls the start() method of that class with parsed information. */ - commentParser parser = new commentParser(); + CommentParser parser = new CommentParser(); com.sun.tools.javadoc.Main.execute("doxygen_translate_links runtime test", - "commentParser", new String[]{"-quiet", "doxygen_translate_links"}); + "CommentParser", + new String[]{"-quiet", "doxygen_translate_links"}); HashMap wantedComments = new HashMap(); diff --git a/Examples/test-suite/java/doxygen_translate_runme.java b/Examples/test-suite/java/doxygen_translate_runme.java index 10b5af28d..b93df89bf 100644 --- a/Examples/test-suite/java/doxygen_translate_runme.java +++ b/Examples/test-suite/java/doxygen_translate_runme.java @@ -2,6 +2,7 @@ import doxygen_translate.*; import com.sun.javadoc.*; import java.util.HashMap; +import java.util.Map; public class doxygen_translate_runme { static { @@ -19,11 +20,12 @@ public class doxygen_translate_runme { Here we are using internal javadoc tool, it accepts the name of the class as paramterer, and calls the start() method of that class with parsed information. */ - commentParser parser = new commentParser(); + CommentParser parser = new CommentParser(); com.sun.tools.javadoc.Main.execute("doxygen_translate runtime test", - "commentParser", new String[]{"-quiet", "doxygen_translate"}); + "CommentParser", + new String[]{"-quiet", "doxygen_translate"}); - HashMap wantedComments = new HashMap(); + Map wantedComments = new HashMap(); wantedComments.put("doxygen_translate.doxygen_translate.function(int, float)", " Hello \n" +