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

Print this page

        

*** 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); + } }