1.1 --- a/src/share/classes/javax/lang/model/util/ElementKindVisitor6.java Mon Jan 31 19:06:32 2011 -0800 1.2 +++ b/src/share/classes/javax/lang/model/util/ElementKindVisitor6.java Tue Feb 01 10:11:05 2011 -0800 1.3 @@ -1,5 +1,5 @@ 1.4 /* 1.5 - * Copyright (c) 2005, 2010, Oracle and/or its affiliates. All rights reserved. 1.6 + * Copyright (c) 2005, 2011, Oracle and/or its affiliates. All rights reserved. 1.7 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. 1.8 * 1.9 * This code is free software; you can redistribute it and/or modify it 1.10 @@ -199,7 +199,8 @@ 1.11 * Visits a variable element, dispatching to the visit method for 1.12 * the specific {@linkplain ElementKind kind} of variable, {@code 1.13 * ENUM_CONSTANT}, {@code EXCEPTION_PARAMETER}, {@code FIELD}, 1.14 - * {@code LOCAL_VARIABLE}, or {@code PARAMETER}. 1.15 + * {@code LOCAL_VARIABLE}, {@code PARAMETER}, or {@code RESOURCE_VARIABLE}. 1.16 + * 1.17 * @param e {@inheritDoc} 1.18 * @param p {@inheritDoc} 1.19 * @return the result of the kind-specific visit method 1.20 @@ -223,10 +224,12 @@ 1.21 case PARAMETER: 1.22 return visitVariableAsParameter(e, p); 1.23 1.24 + case RESOURCE_VARIABLE: 1.25 + return visitVariableAsResourceVariable(e, p); 1.26 + 1.27 default: 1.28 throw new AssertionError("Bad kind " + k + " for VariableElement" + e); 1.29 } 1.30 - 1.31 } 1.32 1.33 /** 1.34 @@ -290,6 +293,20 @@ 1.35 } 1.36 1.37 /** 1.38 + * Visits a {@code RESOURCE_VARIABLE} variable element by calling 1.39 + * {@code visitUnknown}. 1.40 + * 1.41 + * @param e the element to visit 1.42 + * @param p a visitor-specified parameter 1.43 + * @return the result of {@code visitUnknown} 1.44 + * 1.45 + * @since 1.7 1.46 + */ 1.47 + public R visitVariableAsResourceVariable(VariableElement e, P p) { 1.48 + return visitUnknown(e, p); 1.49 + } 1.50 + 1.51 + /** 1.52 * Visits an executable element, dispatching to the visit method 1.53 * for the specific {@linkplain ElementKind kind} of executable, 1.54 * {@code CONSTRUCTOR}, {@code INSTANCE_INIT}, {@code METHOD}, or