langtools/src/share/sample/javac/processing/src/CheckNamesProcessor.java
changeset 25690 b1dac768ab79
parent 10192 378321489bea
equal deleted inserted replaced
25608:e1be1d88a557 25690:b1dac768ab79
     1 /*
     1 /*
     2  * Copyright (c) 2006, 2011, Oracle and/or its affiliates. All rights reserved.
     2  * Copyright (c) 2006, 2014, Oracle and/or its affiliates. All rights reserved.
     3  *
     3  *
     4  * Redistribution and use in source and binary forms, with or without
     4  * Redistribution and use in source and binary forms, with or without
     5  * modification, are permitted provided that the following conditions
     5  * modification, are permitted provided that the following conditions
     6  * are met:
     6  * are met:
     7  *
     7  *
   136 
   136 
   137     @Override
   137     @Override
   138     public SourceVersion getSupportedSourceVersion() {
   138     public SourceVersion getSupportedSourceVersion() {
   139         /*
   139         /*
   140          * Return latest source version instead of a fixed version
   140          * Return latest source version instead of a fixed version
   141          * like RELEASE_8.  To return a fixed version, this class
   141          * like RELEASE_9.  To return a fixed version, this class
   142          * could be annotated with a SupportedSourceVersion
   142          * could be annotated with a SupportedSourceVersion
   143          * annotation.
   143          * annotation.
   144          *
   144          *
   145          * Warnings will be issued if any unknown language constructs
   145          * Warnings will be issued if any unknown language constructs
   146          * are encountered.
   146          * are encountered.
   190         }
   190         }
   191 
   191 
   192         /**
   192         /**
   193          * Visitor to implement name checks.
   193          * Visitor to implement name checks.
   194          */
   194          */
   195         private class NameCheckScanner extends ElementScanner8<Void, Void> {
   195         private class NameCheckScanner extends ElementScanner9<Void, Void> {
   196             // The visitor could be enhanced to return true/false if
   196             // The visitor could be enhanced to return true/false if
   197             // there were warnings reported or a count of the number
   197             // there were warnings reported or a count of the number
   198             // of warnings.  This could be facilitated by using
   198             // of warnings.  This could be facilitated by using
   199             // Boolean or Integer instead of Void for the actual type
   199             // Boolean or Integer instead of Void for the actual type
   200             // arguments.  In more detail, one way to tally the number
   200             // arguments.  In more detail, one way to tally the number