< prev index next >

src/java.compiler/share/classes/javax/lang/model/util/SimpleElementVisitor8.java

Print this page




  44  * subclasses with {@link java.lang.Override @Override} will help
  45  * ensure that methods are overridden as intended.
  46  *
  47  * <p> <b>WARNING:</b> The {@code ElementVisitor} interface
  48  * implemented by this class may have methods added to it in the
  49  * future to accommodate new, currently unknown, language structures
  50  * added to future versions of the Java&trade; programming language.
  51  * Therefore, methods whose names begin with {@code "visit"} may be
  52  * added to this class in the future; to avoid incompatibilities,
  53  * classes which extend this class should not declare any instance
  54  * methods with names beginning with {@code "visit"}.
  55  *
  56  * <p>When such a new visit method is added, the default
  57  * implementation in this class will be to call the {@link
  58  * #visitUnknown visitUnknown} method.  A new simple element visitor
  59  * class will also be introduced to correspond to the new language
  60  * level; this visitor will have different default behavior for the
  61  * visit method in question.  When the new visitor is introduced, all
  62  * or portions of this visitor may be deprecated.
  63  *
  64  * <p>Note that adding a default implementation of a new visit method
  65  * in a visitor class will occur instead of adding a <em>default
  66  * method</em> directly in the visitor interface since a Java SE 8
  67  * language feature cannot be used to this version of the API since
  68  * this version is required to be runnable on Java SE 7
  69  * implementations.  Future versions of the API that are only required
  70  * to run on Java SE 8 and later may take advantage of default methods
  71  * in this situation.
  72  *
  73  * @param <R> the return type of this visitor's methods.  Use {@code Void}
  74  *             for visitors that do not need to return results.
  75  * @param <P> the type of the additional parameter to this visitor's methods.  Use {@code Void}
  76  *              for visitors that do not need an additional parameter.
  77  *
  78  * @see SimpleElementVisitor6
  79  * @see SimpleElementVisitor7
  80  * @see SimpleElementVisitor9
  81  * @since 1.8
  82  */
  83 @SupportedSourceVersion(RELEASE_8)
  84 public class SimpleElementVisitor8<R, P> extends SimpleElementVisitor7<R, P> {
  85     /**
  86      * Constructor for concrete subclasses; uses {@code null} for the
  87      * default value.
  88      */
  89     protected SimpleElementVisitor8(){
  90         super(null);
  91     }
  92 


  44  * subclasses with {@link java.lang.Override @Override} will help
  45  * ensure that methods are overridden as intended.
  46  *
  47  * <p> <b>WARNING:</b> The {@code ElementVisitor} interface
  48  * implemented by this class may have methods added to it in the
  49  * future to accommodate new, currently unknown, language structures
  50  * added to future versions of the Java&trade; programming language.
  51  * Therefore, methods whose names begin with {@code "visit"} may be
  52  * added to this class in the future; to avoid incompatibilities,
  53  * classes which extend this class should not declare any instance
  54  * methods with names beginning with {@code "visit"}.
  55  *
  56  * <p>When such a new visit method is added, the default
  57  * implementation in this class will be to call the {@link
  58  * #visitUnknown visitUnknown} method.  A new simple element visitor
  59  * class will also be introduced to correspond to the new language
  60  * level; this visitor will have different default behavior for the
  61  * visit method in question.  When the new visitor is introduced, all
  62  * or portions of this visitor may be deprecated.
  63  *









  64  * @param <R> the return type of this visitor's methods.  Use {@code Void}
  65  *             for visitors that do not need to return results.
  66  * @param <P> the type of the additional parameter to this visitor's methods.  Use {@code Void}
  67  *              for visitors that do not need an additional parameter.
  68  *
  69  * @see SimpleElementVisitor6
  70  * @see SimpleElementVisitor7
  71  * @see SimpleElementVisitor9
  72  * @since 1.8
  73  */
  74 @SupportedSourceVersion(RELEASE_8)
  75 public class SimpleElementVisitor8<R, P> extends SimpleElementVisitor7<R, P> {
  76     /**
  77      * Constructor for concrete subclasses; uses {@code null} for the
  78      * default value.
  79      */
  80     protected SimpleElementVisitor8(){
  81         super(null);
  82     }
  83 
< prev index next >