src/share/classes/javax/lang/model/util/ElementKindVisitor6.java

Print this page


   1 /*
   2  * Copyright (c) 2005, 2013, Oracle and/or its affiliates. All rights reserved.
   3  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
   4  *
   5  * This code is free software; you can redistribute it and/or modify it
   6  * under the terms of the GNU General Public License version 2 only, as
   7  * published by the Free Software Foundation.  Oracle designates this
   8  * particular file as subject to the "Classpath" exception as provided
   9  * by Oracle in the LICENSE file that accompanied this code.
  10  *
  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 Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
  22  * or visit www.oracle.com if you need additional information or have any


  71  * in a visitor class will occur instead of adding a <em>default
  72  * method</em> directly in the visitor interface since a Java SE 8
  73  * language feature cannot be used to this version of the API since
  74  * this version is required to be runnable on Java SE 7
  75  * implementations.  Future versions of the API that are only required
  76  * to run on Java SE 8 and later may take advantage of default methods
  77  * in this situation.
  78  *
  79  * @param <R> the return type of this visitor's methods.  Use {@link
  80  *            Void} for visitors that do not need to return results.
  81  * @param <P> the type of the additional parameter to this visitor's
  82  *            methods.  Use {@code Void} for visitors that do not need an
  83  *            additional parameter.
  84  *
  85  * @author Joseph D. Darcy
  86  * @author Scott Seligman
  87  * @author Peter von der Ah&eacute;
  88  *
  89  * @see ElementKindVisitor7
  90  * @see ElementKindVisitor8

  91  * @since 1.6


  92  */

  93 @SupportedSourceVersion(RELEASE_6)
  94 public class ElementKindVisitor6<R, P>
  95                   extends SimpleElementVisitor6<R, P> {
  96     /**
  97      * Constructor for concrete subclasses; uses {@code null} for the
  98      * default value.
  99      */
 100     protected ElementKindVisitor6() {
 101         super(null);
 102     }
 103 
 104     /**
 105      * Constructor for concrete subclasses; uses the argument for the
 106      * default value.
 107      *
 108      * @param defaultValue the value to assign to {@link #DEFAULT_VALUE}
 109      */
 110     protected ElementKindVisitor6(R defaultValue) {
 111         super(defaultValue);
 112     }


   1 /*
   2  * Copyright (c) 2005, 2014, Oracle and/or its affiliates. All rights reserved.
   3  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
   4  *
   5  * This code is free software; you can redistribute it and/or modify it
   6  * under the terms of the GNU General Public License version 2 only, as
   7  * published by the Free Software Foundation.  Oracle designates this
   8  * particular file as subject to the "Classpath" exception as provided
   9  * by Oracle in the LICENSE file that accompanied this code.
  10  *
  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 Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
  22  * or visit www.oracle.com if you need additional information or have any


  71  * in a visitor class will occur instead of adding a <em>default
  72  * method</em> directly in the visitor interface since a Java SE 8
  73  * language feature cannot be used to this version of the API since
  74  * this version is required to be runnable on Java SE 7
  75  * implementations.  Future versions of the API that are only required
  76  * to run on Java SE 8 and later may take advantage of default methods
  77  * in this situation.
  78  *
  79  * @param <R> the return type of this visitor's methods.  Use {@link
  80  *            Void} for visitors that do not need to return results.
  81  * @param <P> the type of the additional parameter to this visitor's
  82  *            methods.  Use {@code Void} for visitors that do not need an
  83  *            additional parameter.
  84  *
  85  * @author Joseph D. Darcy
  86  * @author Scott Seligman
  87  * @author Peter von der Ah&eacute;
  88  *
  89  * @see ElementKindVisitor7
  90  * @see ElementKindVisitor8
  91  * @see ElementKindVisitor9
  92  * @since 1.6
  93  * @deprecated Release 6 is obsolete; update to a visitor for a newer
  94  * release level.
  95  */
  96 @Deprecated
  97 @SupportedSourceVersion(RELEASE_6)
  98 public class ElementKindVisitor6<R, P>
  99                   extends SimpleElementVisitor6<R, P> {
 100     /**
 101      * Constructor for concrete subclasses; uses {@code null} for the
 102      * default value.
 103      */
 104     protected ElementKindVisitor6() {
 105         super(null);
 106     }
 107 
 108     /**
 109      * Constructor for concrete subclasses; uses the argument for the
 110      * default value.
 111      *
 112      * @param defaultValue the value to assign to {@link #DEFAULT_VALUE}
 113      */
 114     protected ElementKindVisitor6(R defaultValue) {
 115         super(defaultValue);
 116     }