diff options
author | Andrew John Hughes <gnu_andrew@member.fsf.org> | 2015-11-27 08:22:17 +0000 |
---|---|---|
committer | Andrew John Hughes <gnu_andrew@member.fsf.org> | 2015-12-22 01:59:02 +0000 |
commit | 11d1d8efc1b17eb87b4cd6aa5ae82f67cb862e96 (patch) | |
tree | bb2ab2a0c820ddcb5a8a91e76f5da0e522e662eb /javax/lang/model/util/SimpleAnnotationValueVisitor7.java | |
parent | f41a2c18c6dd259d21cf72a0e66e68c7a0c9a808 (diff) | |
download | classpath-11d1d8efc1b17eb87b4cd6aa5ae82f67cb862e96.tar.gz |
Add remaining javax.lang.model.util classes for Java 7.
2015-11-26 Andrew John Hughes <gnu_andrew@member.fsf.org>
* javax/lang/model/util/AbstractAnnotationValueVisitor6.java:
Fix missing brace in Javadoc.
* javax/lang/model/util/AbstractAnnotationValueVisitor7.java:
New abstract class.
(AbstractAnnotationValueVisitor7()): Implemented.
* javax/lang/model/util/AbstractElementVisitor7.java,
New abstract class.
(AbstractElementVisitor7()): Implemented.
* javax/lang/model/util/AbstractTypeVisitor6.java:
Fix missing brace in Javadoc.
* javax/lang/model/util/AbstractTypeVisitor7.java:
New abstract class.
(AbstractTypeVisitor7()): Implemented.
(visitUnion(UnionType,P)): Likewise.
* javax/lang/model/util/ElementKindVisitor6.java:
(visitVariableAsResourceVariable(VariableElement,P)):
Should call visitUnknown for version 6.
* javax/lang/model/util/ElementKindVisitor7.java:
New class.
(ElementKindVisitor7()): Implemented.
(ElementKindVisitor7(R)): Likewise.
(visitVariableAsResourceVariable(VariableElement,P)):
Implemented to return the result of defaultAction.
* javax/lang/model/util/ElementScanner6.java:
Fix missing brace in Javadoc. Add missing @return
documentation.
(visitVariable(VariableElement,P)): Should call visitUnknown
on 6 if the element is a resource variable element.
* javax/lang/model/util/ElementScanner7.java,
New class.
(ElementScanner7()): Implemented.
(ElementScanner7(R)): Likewise.
(visitVariable(VariableElement,P)): Implemented.
* javax/lang/model/util/SimpleAnnotationValueVisitor7.java:
New class.
(SimpleAnnotationValueVisitor7()): Implemented.
(SimpleAnnotationValueVisitor7(R)): Likewise.
* javax/lang/model/util/SimpleElementVisitor6.java:
(visitVariable(VariableElement,P)): Should call visitUnknown
on 6 if the element is a resource variable element.
* javax/lang/model/util/SimpleElementVisitor7.java:
New class.
(SimpleElementVisitor7()): Implemented.
(SimpleElementVisitor7(R)): Likewise.
(visitVariable(VariableElement,P)): Implemented.
* javax/lang/model/util/SimpleTypeVisitor6.java:
(SimpleTypeVisitor6): Fix copy-and-paste error in documentation.
* javax/lang/model/util/SimpleTypeVisitor7.java:
New class.
(SimpleTypeVisitor7()): Implemented.
(SimpleTypeVisitor7(R)): Likewise.
(visitUnion(UnionType,P)): Implemented.
* javax/lang/model/util/TypeKindVisitor7.java,
New class.
(TypeKindVisitor7()): Implemented.
(TypeKindVisitor7(R)): Likewise.
(visitUnion(UnionType,P)): Implemented.
Signed-off-by: Andrew John Hughes <gnu_andrew@member.fsf.org>
Diffstat (limited to 'javax/lang/model/util/SimpleAnnotationValueVisitor7.java')
-rw-r--r-- | javax/lang/model/util/SimpleAnnotationValueVisitor7.java | 94 |
1 files changed, 94 insertions, 0 deletions
diff --git a/javax/lang/model/util/SimpleAnnotationValueVisitor7.java b/javax/lang/model/util/SimpleAnnotationValueVisitor7.java new file mode 100644 index 000000000..1f2485e39 --- /dev/null +++ b/javax/lang/model/util/SimpleAnnotationValueVisitor7.java @@ -0,0 +1,94 @@ +/* SimpleAnnotationValueVisitor7.java -- A simple visitor implementation for 1.7. + Copyright (C) 2015 Free Software Foundation, Inc. + +This file is part of GNU Classpath. + +GNU Classpath is free software; you can redistribute it and/or modify +it under the terms of the GNU General Public License as published by +the Free Software Foundation; either version 2, or (at your option) +any later version. + +GNU Classpath is distributed in the hope that it will be useful, but +WITHOUT ANY WARRANTY; without even the implied warranty of +MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +General Public License for more details. + +You should have received a copy of the GNU General Public License +along with GNU Classpath; see the file COPYING. If not, write to the +Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA +02110-1301 USA. + +Linking this library statically or dynamically with other modules is +making a combined work based on this library. Thus, the terms and +conditions of the GNU General Public License cover the whole +combination. + +As a special exception, the copyright holders of this library give you +permission to link this library with independent modules to produce an +executable, regardless of the license terms of these independent +modules, and to copy and distribute the resulting executable under +terms of your choice, provided that you also meet, for each linked +independent module, the terms and conditions of the license of that +module. An independent module is a module which is not derived from +or based on this library. If you modify this library, you may extend +this exception to your version of the library, but you are not +obligated to do so. If you do not wish to do so, delete this +exception statement from your version. */ + +package javax.lang.model.util; + +import javax.annotation.processing.SupportedSourceVersion; + +import javax.lang.model.SourceVersion; + +/** + * <p>A simple implementation of {@link AnnotationValueVisitor} for the + * 1.7 version of the Java programming language + * ({@link SourceVersion#RELEASE_7}). Each {@code visitXYZ} method + * redirects to {@code defaultAction(value, parameter)}. + * Implementors may extend this class and provide alternative + * implementations of {@link #defaultAction(Object, P)} and + * the {@code visitXYZ} methods as appropriate.</p> + * <p>As the interface this class implements may be extended in future, + * in order to support later language versions, methods beginning with + * the phrase {@code "visit"} should be avoided in subclasses. This + * class itself will be extended to direct these new methods to the + * {@link #visitUnknown(AnnotationValue,P)} method and a new class will be + * added to provide implementations for the new language version. + * At this time, all or some of this class may be deprecated.</p> + * + * @param <R> the return type of the visitor's methods. {@code Void} + * can be used where there is no return value. + * @param <P> the type of the additional parameter supplied to the visitor's + * methods. + * + * @author Andrew John Hughes (gnu_andrew@member.fsf.org) + * @since 1.7 + */ +@SupportedSourceVersion(SourceVersion.RELEASE_7) +public class SimpleAnnotationValueVisitor7<R,P> extends SimpleAnnotationValueVisitor6<R,P> +{ + + /** + * Constructs a new {@link SimpleAnnotationValueVisitor7} with a {@code null} + * default value. + */ + protected SimpleAnnotationValueVisitor7() + { + this(null); + } + + /** + * Constructs a new {@link SimpleAnnotationValueVisitor7} with the specified + * default value. + * + * @param defaultValue the value to assign to {@link #DEFAULT_VALUE}. + */ + protected SimpleAnnotationValueVisitor7(R defaultValue) + { + super(defaultValue); + } + +} + + |