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

Print this page

        

*** 1,7 **** /* ! * Copyright (c) 2010, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it * under the terms of the GNU General Public License version 2 only, as * published by the Free Software Foundation. Oracle designates this --- 1,7 ---- /* ! * Copyright (c) 2010, 2011 Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it * under the terms of the GNU General Public License version 2 only, as * published by the Free Software Foundation. Oracle designates this
*** 32,42 **** import javax.lang.model.SourceVersion; /** * A visitor of program elements based on their {@linkplain * ElementKind kind} with default behavior appropriate for the {@link ! * SourceVersion#RELEASE_6 RELEASE_6} source version. For {@linkplain * Element elements} <tt><i>XYZ</i></tt> that may have more than one * kind, the <tt>visit<i>XYZ</i></tt> methods in this class delegate * to the <tt>visit<i>XYZKind</i></tt> method corresponding to the * first argument's kind. The <tt>visit<i>XYZKind</i></tt> methods * call {@link #defaultAction defaultAction}, passing their arguments --- 32,42 ---- import javax.lang.model.SourceVersion; /** * A visitor of program elements based on their {@linkplain * ElementKind kind} with default behavior appropriate for the {@link ! * SourceVersion#RELEASE_7 RELEASE_7} source version. For {@linkplain * Element elements} <tt><i>XYZ</i></tt> that may have more than one * kind, the <tt>visit<i>XYZ</i></tt> methods in this class delegate * to the <tt>visit<i>XYZKind</i></tt> method corresponding to the * first argument's kind. The <tt>visit<i>XYZKind</i></tt> methods * call {@link #defaultAction defaultAction}, passing their arguments
*** 92,97 **** --- 92,110 ---- * @param defaultValue the value to assign to {@link #DEFAULT_VALUE} */ protected ElementKindVisitor7(R defaultValue) { super(defaultValue); } + + /** + * Visits a {@code RESOURCE_VARIABLE} variable element by calling + * {@code defaultAction}. + * + * @param e {@inheritDoc} + * @param p {@inheritDoc} + * @return the result of {@code defaultAction} + */ + @Override + public R visitVariableAsResourceVariable(VariableElement e, P p) { + return defaultAction(e, p); + } }