574N/A/*
850N/A * Copyright (c) 2010, 2011, Oracle and/or its affiliates. All rights reserved.
574N/A * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
574N/A *
574N/A * This code is free software; you can redistribute it and/or modify it
574N/A * under the terms of the GNU General Public License version 2 only, as
574N/A * published by the Free Software Foundation. Oracle designates this
574N/A * particular file as subject to the "Classpath" exception as provided
574N/A * by Oracle in the LICENSE file that accompanied this code.
574N/A *
574N/A * This code is distributed in the hope that it will be useful, but WITHOUT
574N/A * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
574N/A * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
574N/A * version 2 for more details (a copy is included in the LICENSE file that
574N/A * accompanied this code).
574N/A *
574N/A * You should have received a copy of the GNU General Public License version
574N/A * 2 along with this work; if not, write to the Free Software Foundation,
574N/A * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
574N/A *
574N/A * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
574N/A * or visit www.oracle.com if you need additional information or have any
574N/A * questions.
574N/A */
574N/A
574N/Apackage javax.lang.model.util;
574N/A
574N/Aimport java.util.List;
574N/Aimport javax.lang.model.element.*;
574N/A
574N/Aimport javax.lang.model.type.TypeMirror;
574N/Aimport static javax.lang.model.SourceVersion.*;
574N/Aimport javax.lang.model.SourceVersion;
574N/Aimport javax.annotation.processing.SupportedSourceVersion;
574N/A
574N/A/**
574N/A * A simple visitor for annotation values with default behavior
574N/A * appropriate for the {@link SourceVersion#RELEASE_7 RELEASE_7}
850N/A * source version. Visit methods call {@link #defaultAction
850N/A * defaultAction} passing their arguments to {@code defaultAction}'s
574N/A * corresponding parameters.
574N/A *
574N/A * <p> Methods in this class may be overridden subject to their
574N/A * general contract. Note that annotating methods in concrete
574N/A * subclasses with {@link java.lang.Override @Override} will help
574N/A * ensure that methods are overridden as intended.
574N/A *
574N/A * <p> <b>WARNING:</b> The {@code AnnotationValueVisitor} interface
574N/A * implemented by this class may have methods added to it in the
574N/A * future to accommodate new, currently unknown, language structures
574N/A * added to future versions of the Java&trade; programming language.
574N/A * Therefore, methods whose names begin with {@code "visit"} may be
574N/A * added to this class in the future; to avoid incompatibilities,
574N/A * classes which extend this class should not declare any instance
574N/A * methods with names beginning with {@code "visit"}.
574N/A *
574N/A * <p>When such a new visit method is added, the default
574N/A * implementation in this class will be to call the {@link
574N/A * #visitUnknown visitUnknown} method. A new simple annotation
574N/A * value visitor class will also be introduced to correspond to the
574N/A * new language level; this visitor will have different default
574N/A * behavior for the visit method in question. When the new visitor is
574N/A * introduced, all or portions of this visitor may be deprecated.
574N/A *
574N/A * @param <R> the return type of this visitor's methods
574N/A * @param <P> the type of the additional parameter to this visitor's methods.
574N/A *
574N/A * @see SimpleAnnotationValueVisitor6
574N/A * @since 1.7
574N/A */
574N/A@SupportedSourceVersion(RELEASE_7)
574N/Apublic class SimpleAnnotationValueVisitor7<R, P> extends SimpleAnnotationValueVisitor6<R, P> {
574N/A /**
574N/A * Constructor for concrete subclasses; uses {@code null} for the
574N/A * default value.
574N/A */
574N/A protected SimpleAnnotationValueVisitor7() {
574N/A super(null);
574N/A }
574N/A
574N/A /**
574N/A * Constructor for concrete subclasses; uses the argument for the
574N/A * default value.
574N/A *
574N/A * @param defaultValue the value to assign to {@link #DEFAULT_VALUE}
574N/A */
574N/A protected SimpleAnnotationValueVisitor7(R defaultValue) {
574N/A super(defaultValue);
574N/A }
574N/A}