src/share/classes/javax/lang/model/util/SimpleElementVisitor7.java
Print this page
@@ -1,7 +1,7 @@
/*
- * Copyright (c) 2010, Oracle and/or its affiliates. All rights reserved.
+ * 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
@@ -34,13 +34,14 @@
/**
* A simple visitor of program elements with default behavior
* appropriate for the {@link SourceVersion#RELEASE_7 RELEASE_7}
* source version.
*
- * Visit methods corresponding to {@code RELEASE_7} language
- * constructs call {@link #defaultAction}, passing their arguments to
- * {@code defaultAction}'s corresponding parameters.
+ * Visit methods corresponding to {@code RELEASE_7} and earlier
+ * language constructs call {@link #defaultAction defaultAction},
+ * passing their arguments to {@code defaultAction}'s corresponding
+ * parameters.
*
* <p> Methods in this class may be overridden subject to their
* general contract. Note that annotating methods in concrete
* subclasses with {@link java.lang.Override @Override} will help
* ensure that methods are overridden as intended.
@@ -87,6 +88,18 @@
* @param defaultValue the value to assign to {@link #DEFAULT_VALUE}
*/
protected SimpleElementVisitor7(R defaultValue){
super(defaultValue);
}
+
+ /**
+ * This implementation calls {@code defaultAction}.
+ *
+ * @param e {@inheritDoc}
+ * @param p {@inheritDoc}
+ * @return the result of {@code defaultAction}
+ */
+ @Override
+ public R visitVariable(VariableElement e, P p) {
+ return defaultAction(e, p);
+ }
}