src/share/classes/com/sun/mirror/util/DeclarationVisitors.java

Print this page




  11  * This code is distributed in the hope that it will be useful, but WITHOUT
  12  * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
  13  * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
  14  * version 2 for more details (a copy is included in the LICENSE file that
  15  * accompanied this code).
  16  *
  17  * You should have received a copy of the GNU General Public License version
  18  * 2 along with this work; if not, write to the Free Software Foundation,
  19  * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
  20  *
  21  * Please contact Sun Microsystems, Inc., 4150 Network Circle, Santa Clara,
  22  * CA 95054 USA or visit www.sun.com if you need additional information or
  23  * have any questions.
  24  */
  25 
  26 package com.sun.mirror.util;
  27 
  28 /**
  29  * Utilities to create specialized <tt>DeclarationVisitor</tt> instances.
  30  *





  31  * @author Joseph D. Darcy
  32  * @author Scott Seligman
  33  * @since 1.5
  34  */


  35 public class DeclarationVisitors {
  36     private DeclarationVisitors(){} // do not instantiate.
  37 
  38     /**
  39      * A visitor that has no side effects and keeps no state.
  40      */
  41     public static final DeclarationVisitor NO_OP = new SimpleDeclarationVisitor();
  42 
  43     /**
  44      * Return a <tt>DeclarationVisitor</tt> that will scan the
  45      * declaration structure, visiting declarations contained in
  46      * another declaration.  For example, when visiting a class, the
  47      * fields, methods, constructors, etc. of the class are also
  48      * visited.  The order in which the contained declarations are scanned is
  49      * not specified.
  50      *
  51      * <p>The <tt>pre</tt> and <tt>post</tt>
  52      * <tt>DeclarationVisitor</tt> parameters specify,
  53      * respectively, the processing the scanner will do before or
  54      * after visiting the contained declarations.  If only one of pre




  11  * This code is distributed in the hope that it will be useful, but WITHOUT
  12  * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
  13  * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
  14  * version 2 for more details (a copy is included in the LICENSE file that
  15  * accompanied this code).
  16  *
  17  * You should have received a copy of the GNU General Public License version
  18  * 2 along with this work; if not, write to the Free Software Foundation,
  19  * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
  20  *
  21  * Please contact Sun Microsystems, Inc., 4150 Network Circle, Santa Clara,
  22  * CA 95054 USA or visit www.sun.com if you need additional information or
  23  * have any questions.
  24  */
  25 
  26 package com.sun.mirror.util;
  27 
  28 /**
  29  * Utilities to create specialized <tt>DeclarationVisitor</tt> instances.
  30  *
  31  * @deprecated All components of this API have been superseded by the
  32  * standardized annotation processing API.  There is no direct
  33  * replacement for the functionality of this class in the standardized
  34  * API due to that API's different visitor structure.
  35  *
  36  * @author Joseph D. Darcy
  37  * @author Scott Seligman
  38  * @since 1.5
  39  */
  40 @Deprecated
  41 @SuppressWarnings("deprecation")
  42 public class DeclarationVisitors {
  43     private DeclarationVisitors(){} // do not instantiate.
  44 
  45     /**
  46      * A visitor that has no side effects and keeps no state.
  47      */
  48     public static final DeclarationVisitor NO_OP = new SimpleDeclarationVisitor();
  49 
  50     /**
  51      * Return a <tt>DeclarationVisitor</tt> that will scan the
  52      * declaration structure, visiting declarations contained in
  53      * another declaration.  For example, when visiting a class, the
  54      * fields, methods, constructors, etc. of the class are also
  55      * visited.  The order in which the contained declarations are scanned is
  56      * not specified.
  57      *
  58      * <p>The <tt>pre</tt> and <tt>post</tt>
  59      * <tt>DeclarationVisitor</tt> parameters specify,
  60      * respectively, the processing the scanner will do before or
  61      * after visiting the contained declarations.  If only one of pre