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

Print this page

        

*** 1,7 **** /* ! * Copyright (c) 2005, 2006, 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) 2005, 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
*** 197,207 **** /** * Visits a variable element, dispatching to the visit method for * the specific {@linkplain ElementKind kind} of variable, {@code * ENUM_CONSTANT}, {@code EXCEPTION_PARAMETER}, {@code FIELD}, ! * {@code LOCAL_VARIABLE}, or {@code PARAMETER}. * @param e {@inheritDoc} * @param p {@inheritDoc} * @return the result of the kind-specific visit method */ @Override --- 197,208 ---- /** * Visits a variable element, dispatching to the visit method for * the specific {@linkplain ElementKind kind} of variable, {@code * ENUM_CONSTANT}, {@code EXCEPTION_PARAMETER}, {@code FIELD}, ! * {@code LOCAL_VARIABLE}, {@code PARAMETER}, or {@code RESOURCE_VARIABLE}. ! * * @param e {@inheritDoc} * @param p {@inheritDoc} * @return the result of the kind-specific visit method */ @Override
*** 221,234 **** return visitVariableAsLocalVariable(e, p); case PARAMETER: return visitVariableAsParameter(e, p); default: throw new AssertionError("Bad kind " + k + " for VariableElement" + e); } - } /** * Visits an {@code ENUM_CONSTANT} variable element by calling * {@code defaultAction}. --- 222,237 ---- return visitVariableAsLocalVariable(e, p); case PARAMETER: return visitVariableAsParameter(e, p); + case RESOURCE_VARIABLE: + return visitVariableAsResourceVariable(e, p); + default: throw new AssertionError("Bad kind " + k + " for VariableElement" + e); } } /** * Visits an {@code ENUM_CONSTANT} variable element by calling * {@code defaultAction}.
*** 288,297 **** --- 291,314 ---- public R visitVariableAsParameter(VariableElement e, P p) { return defaultAction(e, p); } /** + * Visits a {@code RESOURCE_VARIABLE} variable element by calling + * {@code visitUnknown}. + * + * @param e the element to visit + * @param p a visitor-specified parameter + * @return the result of {@code visitUnknown} + * + * @since 1.7 + */ + public R visitVariableAsResourceVariable(VariableElement e, P p) { + return visitUnknown(e, p); + } + + /** * Visits an executable element, dispatching to the visit method * for the specific {@linkplain ElementKind kind} of executable, * {@code CONSTRUCTOR}, {@code INSTANCE_INIT}, {@code METHOD}, or * {@code STATIC_INIT}. *