AbstractElementVisitor9.java revision 3971:65d446c80cdf
138494Sobrien/* 2310490Scy * Copyright (c) 2011, 2015, Oracle and/or its affiliates. All rights reserved. 338494Sobrien * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. 438494Sobrien * 538494Sobrien * This code is free software; you can redistribute it and/or modify it 638494Sobrien * under the terms of the GNU General Public License version 2 only, as 738494Sobrien * published by the Free Software Foundation. Oracle designates this 838494Sobrien * particular file as subject to the "Classpath" exception as provided 938494Sobrien * by Oracle in the LICENSE file that accompanied this code. 1038494Sobrien * 1138494Sobrien * This code is distributed in the hope that it will be useful, but WITHOUT 1238494Sobrien * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or 1338494Sobrien * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License 1438494Sobrien * version 2 for more details (a copy is included in the LICENSE file that 1538494Sobrien * accompanied this code). 1638494Sobrien * 1738494Sobrien * You should have received a copy of the GNU General Public License version 1838494Sobrien * 2 along with this work; if not, write to the Free Software Foundation, 19310490Scy * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. 2038494Sobrien * 2138494Sobrien * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA 2238494Sobrien * or visit www.oracle.com if you need additional information or have any 2338494Sobrien * questions. 2438494Sobrien */ 2538494Sobrien 2638494Sobrienpackage javax.lang.model.util; 2738494Sobrien 2838494Sobrienimport javax.annotation.processing.SupportedSourceVersion; 2938494Sobrienimport javax.lang.model.SourceVersion; 3038494Sobrienimport javax.lang.model.element.ModuleElement; 3138494Sobrienimport static javax.lang.model.SourceVersion.*; 3238494Sobrien 3338494Sobrien 3438494Sobrien/** 3538494Sobrien * A skeletal visitor of program elements with default behavior 36174294Sobrien * appropriate for the {@link SourceVersion#RELEASE_9 RELEASE_9} 3738494Sobrien * source version. 3838494Sobrien * 3938494Sobrien * <p> <b>WARNING:</b> The {@code ElementVisitor} interface 4038494Sobrien * implemented by this class may have methods added to it in the 4138494Sobrien * future to accommodate new, currently unknown, language structures 4238494Sobrien * added to future versions of the Java™ programming language. 4338494Sobrien * Therefore, methods whose names begin with {@code "visit"} may be 4438494Sobrien * added to this class in the future; to avoid incompatibilities, 4538494Sobrien * classes which extend this class should not declare any instance 4638494Sobrien * methods with names beginning with {@code "visit"}. 4738494Sobrien * 4838494Sobrien * <p>When such a new visit method is added, the default 4938494Sobrien * implementation in this class will be to call the {@link 5038494Sobrien * #visitUnknown visitUnknown} method. A new abstract element visitor 5138494Sobrien * class will also be introduced to correspond to the new language 52174294Sobrien * level; this visitor will have different default behavior for the 5338494Sobrien * visit method in question. When the new visitor is introduced, all 5438494Sobrien * or portions of this visitor may be deprecated. 5538494Sobrien * 5638494Sobrien * @param <R> the return type of this visitor's methods. Use {@link 5738494Sobrien * Void} for visitors that do not need to return results. 5838494Sobrien * @param <P> the type of the additional parameter to this visitor's 5938494Sobrien * methods. Use {@code Void} for visitors that do not need an 6038494Sobrien * additional parameter. 6138494Sobrien * 6238494Sobrien * @see AbstractElementVisitor6 6338494Sobrien * @see AbstractElementVisitor7 6438494Sobrien * @see AbstractElementVisitor8 6538494Sobrien * @since 9 6638494Sobrien * @spec JPMS 6738494Sobrien */ 6838494Sobrien@SupportedSourceVersion(RELEASE_9) 6938494Sobrienpublic abstract class AbstractElementVisitor9<R, P> extends AbstractElementVisitor8<R, P> { 7038494Sobrien /** 7138494Sobrien * Constructor for concrete subclasses to call. 7238494Sobrien */ 7338494Sobrien protected AbstractElementVisitor9(){ 7438494Sobrien super(); 7538494Sobrien } 7638494Sobrien 7738494Sobrien /** 7838494Sobrien * Visits a {@code ModuleElement} in a manner defined by a 7938494Sobrien * subclass. 8038494Sobrien * 8138494Sobrien * @param t {@inheritDoc} 8238494Sobrien * @param p {@inheritDoc} 8338494Sobrien * @return the result of the visit as defined by a subclass 8438494Sobrien */ 8538494Sobrien @Override 8638494Sobrien public abstract R visitModule(ModuleElement t, P p); 8738494Sobrien} 8838494Sobrien