src/share/sample/javac/processing/src/CheckNamesProcessor.java

Print this page

        

*** 136,146 **** @Override public SourceVersion getSupportedSourceVersion() { /* * Return latest source version instead of a fixed version ! * like RELEASE_6. To return a fixed version, this class * could be annotated with a SupportedSourceVersion * annotation. * * Warnings will be issued if any unknown language constructs * are encountered. --- 136,146 ---- @Override public SourceVersion getSupportedSourceVersion() { /* * Return latest source version instead of a fixed version ! * like RELEASE_7. To return a fixed version, this class * could be annotated with a SupportedSourceVersion * annotation. * * Warnings will be issued if any unknown language constructs * are encountered.
*** 188,198 **** } /** * Visitor to implement name checks. */ ! private class NameCheckScanner extends ElementScanner6<Void, Void> { // The visitor could be enhanced to return true/false if // there were warnings reported or a count of the number // of warnings. This could be facilitated by using // Boolean or Integer instead of Void for the actual type // arguments. In more detail, one way to tally the number --- 188,198 ---- } /** * Visitor to implement name checks. */ ! private class NameCheckScanner extends ElementScanner7<Void, Void> { // The visitor could be enhanced to return true/false if // there were warnings reported or a count of the number // of warnings. This could be facilitated by using // Boolean or Integer instead of Void for the actual type // arguments. In more detail, one way to tally the number
*** 310,320 **** } @Override public Void visitUnknown(Element e, Void p) { // This method will be called if a kind of element ! // added after JDK 6 is visited. Since as of this // writing the conventions for such constructs aren't // known, issue a warning. messager.printMessage(WARNING, "Unknown kind of element, " + e.getKind() + ", no name checking performed.", e); --- 310,320 ---- } @Override public Void visitUnknown(Element e, Void p) { // This method will be called if a kind of element ! // added after JDK 7 is visited. Since as of this // writing the conventions for such constructs aren't // known, issue a warning. messager.printMessage(WARNING, "Unknown kind of element, " + e.getKind() + ", no name checking performed.", e);