AbstractAnnotationValueVisitor7.java revision 2571:10fc81ac75b4
1336809Sdim/*
2336809Sdim * Copyright (c) 2010, 2014, Oracle and/or its affiliates. All rights reserved.
3353358Sdim * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
4353358Sdim *
5353358Sdim * This code is free software; you can redistribute it and/or modify it
6336809Sdim * under the terms of the GNU General Public License version 2 only, as
7336809Sdim * published by the Free Software Foundation.  Oracle designates this
8336809Sdim * particular file as subject to the "Classpath" exception as provided
9336809Sdim * by Oracle in the LICENSE file that accompanied this code.
10336809Sdim *
11336809Sdim * This code is distributed in the hope that it will be useful, but WITHOUT
12336809Sdim * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
13336809Sdim * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
14336809Sdim * version 2 for more details (a copy is included in the LICENSE file that
15336809Sdim * accompanied this code).
16336809Sdim *
17336809Sdim * You should have received a copy of the GNU General Public License version
18336809Sdim * 2 along with this work; if not, write to the Free Software Foundation,
19336809Sdim * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
20336809Sdim *
21360784Sdim * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
22336809Sdim * or visit www.oracle.com if you need additional information or have any
23336809Sdim * questions.
24336809Sdim */
25336809Sdim
26336809Sdimpackage javax.lang.model.util;
27336809Sdim
28336809Sdimimport static javax.lang.model.SourceVersion.*;
29336809Sdimimport javax.lang.model.SourceVersion;
30336809Sdimimport javax.annotation.processing.SupportedSourceVersion;
31336809Sdim
32336809Sdim/**
33336809Sdim * A skeletal visitor for annotation values with default behavior
34336809Sdim * appropriate for the {@link SourceVersion#RELEASE_7 RELEASE_7}
35336809Sdim * source version.
36336809Sdim *
37360784Sdim * <p> <b>WARNING:</b> The {@code AnnotationValueVisitor} interface
38360784Sdim * implemented by this class may have methods added to it in the
39360784Sdim * future to accommodate new, currently unknown, language structures
40360784Sdim * added to future versions of the Java&trade; programming language.
41360784Sdim * Therefore, methods whose names begin with {@code "visit"} may be
42360784Sdim * added to this class in the future; to avoid incompatibilities,
43360784Sdim * classes which extend this class should not declare any instance
44360784Sdim * methods with names beginning with {@code "visit"}.
45360784Sdim *
46360784Sdim * <p>When such a new visit method is added, the default
47336809Sdim * implementation in this class will be to call the {@link
48360784Sdim * #visitUnknown visitUnknown} method.  A new abstract annotation
49336809Sdim * value visitor class will also be introduced to correspond to the
50336809Sdim * new language level; this visitor will have different default
51360784Sdim * behavior for the visit method in question.  When the new visitor is
52360784Sdim * introduced, all or portions of this visitor may be deprecated.
53360784Sdim *
54360784Sdim * <p>Note that adding a default implementation of a new visit method
55360784Sdim * in a visitor class will occur instead of adding a <em>default
56360784Sdim * method</em> directly in the visitor interface since a Java SE 8
57336809Sdim * language feature cannot be used to this version of the API since
58360784Sdim * this version is required to be runnable on Java SE 7
59336809Sdim * implementations.  Future versions of the API that are only required
60360784Sdim * to run on Java SE 8 and later may take advantage of default methods
61336809Sdim * in this situation.
62336809Sdim *
63360784Sdim * @param <R> the return type of this visitor's methods
64360784Sdim * @param <P> the type of the additional parameter to this visitor's methods.
65360784Sdim *
66336809Sdim * @see AbstractAnnotationValueVisitor6
67336809Sdim * @see AbstractAnnotationValueVisitor8
68336809Sdim * @see AbstractAnnotationValueVisitor9
69360784Sdim * @since 1.7
70336809Sdim */
71336809Sdim@SuppressWarnings("deprecation") // Superclass deprecated
72336809Sdim@SupportedSourceVersion(RELEASE_7)
73336809Sdimpublic abstract class AbstractAnnotationValueVisitor7<R, P> extends AbstractAnnotationValueVisitor6<R, P> {
74336809Sdim
75336809Sdim    /**
76336809Sdim     * Constructor for concrete subclasses to call.
77336809Sdim     */
78336809Sdim    protected AbstractAnnotationValueVisitor7() {
79336809Sdim        super();
80336809Sdim    }
81336809Sdim}
82336809Sdim