From 11d1d8efc1b17eb87b4cd6aa5ae82f67cb862e96 Mon Sep 17 00:00:00 2001 From: Andrew John Hughes Date: Fri, 27 Nov 2015 08:22:17 +0000 Subject: Add remaining javax.lang.model.util classes for Java 7. 2015-11-26 Andrew John Hughes * 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 --- ChangeLog | 60 +++++++++++ .../util/AbstractAnnotationValueVisitor6.java | 2 +- .../util/AbstractAnnotationValueVisitor7.java | 78 ++++++++++++++ javax/lang/model/util/AbstractElementVisitor7.java | 78 ++++++++++++++ javax/lang/model/util/AbstractTypeVisitor6.java | 2 +- javax/lang/model/util/AbstractTypeVisitor7.java | 90 ++++++++++++++++ javax/lang/model/util/ElementKindVisitor6.java | 6 +- javax/lang/model/util/ElementKindVisitor7.java | 117 +++++++++++++++++++++ javax/lang/model/util/ElementScanner6.java | 18 +++- javax/lang/model/util/ElementScanner7.java | 112 ++++++++++++++++++++ .../model/util/SimpleAnnotationValueVisitor7.java | 94 +++++++++++++++++ javax/lang/model/util/SimpleElementVisitor6.java | 15 ++- javax/lang/model/util/SimpleElementVisitor7.java | 113 ++++++++++++++++++++ javax/lang/model/util/SimpleTypeVisitor6.java | 2 +- javax/lang/model/util/SimpleTypeVisitor7.java | 111 +++++++++++++++++++ javax/lang/model/util/TypeKindVisitor7.java | 116 ++++++++++++++++++++ 16 files changed, 1001 insertions(+), 13 deletions(-) create mode 100644 javax/lang/model/util/AbstractAnnotationValueVisitor7.java create mode 100644 javax/lang/model/util/AbstractElementVisitor7.java create mode 100644 javax/lang/model/util/AbstractTypeVisitor7.java create mode 100644 javax/lang/model/util/ElementKindVisitor7.java create mode 100644 javax/lang/model/util/ElementScanner7.java create mode 100644 javax/lang/model/util/SimpleAnnotationValueVisitor7.java create mode 100644 javax/lang/model/util/SimpleElementVisitor7.java create mode 100644 javax/lang/model/util/SimpleTypeVisitor7.java create mode 100644 javax/lang/model/util/TypeKindVisitor7.java diff --git a/ChangeLog b/ChangeLog index e4df08d6e..b9603350c 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,63 @@ +2015-11-26 Andrew John Hughes + + * 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. + 2015-09-26 Andrew John Hughes * javax/lang/model/type/WildcardType.java: diff --git a/javax/lang/model/util/AbstractAnnotationValueVisitor6.java b/javax/lang/model/util/AbstractAnnotationValueVisitor6.java index 8f0800f5f..025e57c80 100644 --- a/javax/lang/model/util/AbstractAnnotationValueVisitor6.java +++ b/javax/lang/model/util/AbstractAnnotationValueVisitor6.java @@ -55,7 +55,7 @@ import javax.lang.model.element.UnknownAnnotationValueException; * 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 + * {@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.

* diff --git a/javax/lang/model/util/AbstractAnnotationValueVisitor7.java b/javax/lang/model/util/AbstractAnnotationValueVisitor7.java new file mode 100644 index 000000000..fa967883f --- /dev/null +++ b/javax/lang/model/util/AbstractAnnotationValueVisitor7.java @@ -0,0 +1,78 @@ +/* AbstractAnnotationValueVisitor7.java -- A visitor of annotation values 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; + +/** + *

A skeletal implementation of {@link AnnotationValueVisitor} for the + * 1.7 version of the Java programming language + * ({@link SourceVersion#RELEASE_7}). Implementors can extend this + * class and need provide only implementations of the + * {@code visitXYZ} methods appropriate to 1.7.

+ *

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.

+ * + * @param the return type of the visitor's methods. {@code Void} + * can be used where there is no return value. + * @param

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 abstract class AbstractAnnotationValueVisitor7 extends AbstractAnnotationValueVisitor6 +{ + + /** + * Constructs a new {@code AbstractAnnotationValueVisitor7}. + */ + protected AbstractAnnotationValueVisitor7() + { + super(); + } + +} diff --git a/javax/lang/model/util/AbstractElementVisitor7.java b/javax/lang/model/util/AbstractElementVisitor7.java new file mode 100644 index 000000000..3214c58a1 --- /dev/null +++ b/javax/lang/model/util/AbstractElementVisitor7.java @@ -0,0 +1,78 @@ +/* AbstractElementVisitor7.java -- A visitor of program elements 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; + +/** + *

A skeletal implementation of {@link ElementVisitor} for the + * 1.7 version of the Java programming language + * ({@link SourceVersion#RELEASE_7}). Implementors can extend this + * class and need provide only implementations of the + * {@code visitXYZ} methods appropriate to 1.7.

+ *

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(Element,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.

+ * + * @param the return type of the visitor's methods. {@code Void} + * can be used where there is no return value. + * @param

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 abstract class AbstractElementVisitor7 extends AbstractElementVisitor6 +{ + + /** + * Constructs a new {@code AbstractElementVisitor7}. + */ + protected AbstractElementVisitor7() + { + super(); + } + +} diff --git a/javax/lang/model/util/AbstractTypeVisitor6.java b/javax/lang/model/util/AbstractTypeVisitor6.java index 7d907187d..54f500888 100644 --- a/javax/lang/model/util/AbstractTypeVisitor6.java +++ b/javax/lang/model/util/AbstractTypeVisitor6.java @@ -54,7 +54,7 @@ import javax.lang.model.type.UnknownTypeException; * 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(TypeMirror,P) method and a new class will be + * {@link #visitUnknown(TypeMirror,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.

* diff --git a/javax/lang/model/util/AbstractTypeVisitor7.java b/javax/lang/model/util/AbstractTypeVisitor7.java new file mode 100644 index 000000000..bba1fb713 --- /dev/null +++ b/javax/lang/model/util/AbstractTypeVisitor7.java @@ -0,0 +1,90 @@ +/* AbstractTypeVisitor7.java -- A visitor of types 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.lang.model.SourceVersion; + +import javax.lang.model.type.UnionType; + +/** + *

A skeletal implementation of {@link TypeVisitor} for the + * 1.7 version of the Java programming language + * ({@link SourceVersion#RELEASE_6}). Implementors can extend this + * class and need provide only implementations of the + * {@code visitXYZ} methods appropriate to 1.7.

+ *

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(TypeMirror,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.

+ * + * @param the return type of the visitor's methods. {@code Void} + * can be used where there is no return value. + * @param

the type of the additional parameter supplied to the visitor's + * methods. {@code Void} can be used where no additional + * parameter is required. + * + * @author Andrew John Hughes (gnu_andrew@member.fsf.org) + * @since 1.7 + */ +public abstract class AbstractTypeVisitor7 extends AbstractTypeVisitor6 +{ + + /** + * Constructs a new {@code AbstractTypeVisitor7}. + */ + protected AbstractTypeVisitor7() + { + super(); + } + + /** + * Visits a union type in a manner defined by a concrete subclass. + * + * @param type the union type to visit. + * @param param the additional parameter, specific to the visitor. + * May be {@code null} if permitted by the visitor. + * @return the return value specific to the visitor. + * @since 1.7 + */ + @Override + public abstract R visitUnion(UnionType type, P parameter); + +} diff --git a/javax/lang/model/util/ElementKindVisitor6.java b/javax/lang/model/util/ElementKindVisitor6.java index 8e9760ac3..d9d494271 100644 --- a/javax/lang/model/util/ElementKindVisitor6.java +++ b/javax/lang/model/util/ElementKindVisitor6.java @@ -416,16 +416,16 @@ public class ElementKindVisitor6 extends SimpleElementVisitor6 /** * Visits a {@code RESOURCE_VARIABLE} variable element. This implementation - * simply calls {@code defaultAction(element, parameter)}. + * calls {@code visitUnknown(element, parameter)}. * - * @param element the resource variable variable element to visit. + * @param element the resource variable element to visit. * @param parameter the additional parameter, specific to the visitor. * May be {@code null}. * @return the result of {@code defaultAction(element, parameter)}. */ public R visitVariableAsResourceVariable(VariableElement element, P parameter) { - return defaultAction(element, parameter); + return visitUnknown(element, parameter); } } diff --git a/javax/lang/model/util/ElementKindVisitor7.java b/javax/lang/model/util/ElementKindVisitor7.java new file mode 100644 index 000000000..52d723195 --- /dev/null +++ b/javax/lang/model/util/ElementKindVisitor7.java @@ -0,0 +1,117 @@ +/* ElementKindVisitor7.java -- An element 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; + +import javax.lang.model.element.VariableElement; + +/** + *

An implementation of {@link ElementVisitor} for the + * 1.7 version of the Java programming language + * ({@link SourceVersion#RELEASE_7}) which redirects each + * {@code visitXYZ} method call to a more specific + * {@code visitXYZAsKind} method, depending on the kind + * of the first argument. For example, a call to + * {@code visitExecutable} redirects to {@code visitExecutableAsConstructor}, + * {@code visitExecutableAsInstanceInit}, + * {@code visitExecutableAsMethod} or {@code visitExecutableAsStaticInit}, + * depending on the type of executable supplied. {@code visitXYZAsKind} then + * redirects to {@code defaultAction(element, parameter)}. + * Implementors may extend this class and provide alternative + * implementations of {@link #defaultAction(Element, P)} and + * the {@code visitXYZKind} methods as appropriate.

+ *

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(Element,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.

+ * + * @param the return type of the visitor's methods. {@code Void} + * can be used where there is no return value. + * @param

the type of the additional parameter supplied to the visitor's + * methods. {@code Void} can be used if this is not needed. + * + * @author Andrew John Hughes (gnu_andrew@member.fsf.org) + * @since 1.7 + */ +@SupportedSourceVersion(SourceVersion.RELEASE_7) +public class ElementKindVisitor7 extends ElementKindVisitor6 +{ + + /** + * Constructs a new {@link ElementKindVisitor7} with a {@code null} + * default value. + */ + protected ElementKindVisitor7() + { + this(null); + } + + /** + * Constructs a new {@link ElementKindVisitor7} with the specified + * default value. + * + * @param defaultValue the value to assign to {@link SimpleElementVisitor6#DEFAULT_VALUE}. + */ + protected ElementKindVisitor7(R defaultValue) + { + super(defaultValue); + } + + /** + * Visits a {@code RESOURCE_VARIABLE} variable element. This implementation + * simply calls {@code defaultAction(element, parameter)}. + * + * @param element the resource variable element to visit. + * @param parameter the additional parameter, specific to the visitor. + * May be {@code null}. + * @return the result of {@code defaultAction(element, parameter)}. + */ + public R visitVariableAsResourceVariable(VariableElement element, P parameter) + { + return defaultAction(element, parameter); + } + +} + + diff --git a/javax/lang/model/util/ElementScanner6.java b/javax/lang/model/util/ElementScanner6.java index ef3f0cc61..f229e55d9 100644 --- a/javax/lang/model/util/ElementScanner6.java +++ b/javax/lang/model/util/ElementScanner6.java @@ -1,5 +1,5 @@ /* ElementScanner6.java -- A scanning visitor of program elements for 1.6. - Copyright (C) 2013 Free Software Foundation, Inc. + Copyright (C) 2013, 2015 Free Software Foundation, Inc. This file is part of GNU Classpath. @@ -42,6 +42,7 @@ import javax.annotation.processing.SupportedSourceVersion; import javax.lang.model.SourceVersion; import javax.lang.model.element.Element; +import javax.lang.model.element.ElementKind; import javax.lang.model.element.ElementVisitor; import javax.lang.model.element.ExecutableElement; import javax.lang.model.element.PackageElement; @@ -62,7 +63,7 @@ import javax.lang.model.element.VariableElement; * 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(Element,P) method and a new class will be + * {@link #visitUnknown(Element,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.

* @@ -156,6 +157,7 @@ public class ElementScanner6 extends AbstractElementVisitor6 * @param element the executable element to visit. * @param parameter the additional parameter, specific to the visitor. * May be {@code null}. + * @return the result of scanning the element's parameters. */ @Override public R visitExecutable(ExecutableElement element, P parameter) @@ -171,6 +173,7 @@ public class ElementScanner6 extends AbstractElementVisitor6 * @param element the package element to visit. * @param parameter the additional parameter, specific to the visitor. * May be {@code null}. + * @return the result of scanning the enclosed elements. */ @Override public R visitPackage(PackageElement element, P parameter) @@ -185,6 +188,7 @@ public class ElementScanner6 extends AbstractElementVisitor6 * @param element the type element to visit. * @param parameter the additional parameter, specific to the visitor. * May be {@code null}. + * @return the result of scanning the enclosed elements. */ @Override public R visitType(TypeElement element, P parameter) @@ -199,6 +203,7 @@ public class ElementScanner6 extends AbstractElementVisitor6 * @param element the type parameter element to visit. * @param parameter the additional parameter, specific to the visitor. * May be {@code null}. + * @return the result of scanning the enclosed elements. */ @Override public R visitTypeParameter(TypeParameterElement element, P parameter) @@ -208,15 +213,22 @@ public class ElementScanner6 extends AbstractElementVisitor6 /** * Visits a variable element. This implementation scans the - * enclosed elements. + * enclosed elements, unless the element is a {@code RESOURCE_VARIABLE}, + * in which case it calls {@code visitUnknown(element, parameter)} to + * retain 1.6 behaviour. * * @param element the variable element to visit. * @param parameter the additional parameter, specific to the visitor. * May be {@code null}. + * @return the result of scanning the enclosed elements, or + * the result of {@code visitUnknown(element, parameter)} if + * the element is a {@code RESOURCE_VARIABLE}. */ @Override public R visitVariable(VariableElement element, P parameter) { + if (element.getKind() == ElementKind.RESOURCE_VARIABLE) + return visitUnknown(element, parameter); return scan(element.getEnclosedElements(), parameter); } diff --git a/javax/lang/model/util/ElementScanner7.java b/javax/lang/model/util/ElementScanner7.java new file mode 100644 index 000000000..004f34c5d --- /dev/null +++ b/javax/lang/model/util/ElementScanner7.java @@ -0,0 +1,112 @@ +/* ElementScanner7.java -- A scanning visitor of program elements 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; + +import javax.lang.model.element.Element; +import javax.lang.model.element.ElementVisitor; +import javax.lang.model.element.VariableElement; + +/** + *

A scanning implementation of {@link ElementVisitor} for the + * 1.7 version of the Java programming language + * ({@link SourceVersion#RELEASE_7}). Each {@code visitXYZ} method + * calls {@link scan(Element)} on the elements enclosed within the + * one it receives as an argument. Implementors may extend this + * class and provide alternative implementations of the {@code visitXYZ} + * methods appropriate, so that scanning takes place in a different + * order.

+ *

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(Element,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.

+ * + * @param the return type of the visitor's methods. {@code Void} + * can be used where there is no return value. + * @param

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 ElementScanner7 extends ElementScanner6 +{ + + /** + * Constructs a new {@code ElementScanner7} using {@code null} + * as the default value. + */ + protected ElementScanner7() + { + this(null); + } + + /** + * Constructs a new {@code ElementScanner7} using the specified + * default value. + * + * @param defaultValue the default value to return when there + * no elements to scan. + */ + protected ElementScanner7(R defaultValue) + { + super(defaultValue); + } + + /** + * Visits a variable element. This implementation scans the + * enclosed elements. + * + * @param element the variable element to visit. + * @param parameter the additional parameter, specific to the visitor. + * May be {@code null}. + */ + @Override + public R visitVariable(VariableElement element, P parameter) + { + return scan(element.getEnclosedElements(), parameter); + } + +} 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; + +/** + *

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.

+ *

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.

+ * + * @param the return type of the visitor's methods. {@code Void} + * can be used where there is no return value. + * @param

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 extends SimpleAnnotationValueVisitor6 +{ + + /** + * 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); + } + +} + + diff --git a/javax/lang/model/util/SimpleElementVisitor6.java b/javax/lang/model/util/SimpleElementVisitor6.java index f41315087..f0aacd34b 100644 --- a/javax/lang/model/util/SimpleElementVisitor6.java +++ b/javax/lang/model/util/SimpleElementVisitor6.java @@ -1,5 +1,5 @@ /* SimpleElementVisitor6.java -- A simple visitor implementation for 1.6. - Copyright (C) 2013 Free Software Foundation, Inc. + Copyright (C) 2013, 2015 Free Software Foundation, Inc. This file is part of GNU Classpath. @@ -42,6 +42,7 @@ import javax.annotation.processing.SupportedSourceVersion; import javax.lang.model.SourceVersion; import javax.lang.model.element.Element; +import javax.lang.model.element.ElementKind; import javax.lang.model.element.ElementVisitor; import javax.lang.model.element.ExecutableElement; import javax.lang.model.element.PackageElement; @@ -177,17 +178,23 @@ public class SimpleElementVisitor6 extends AbstractElementVisitor6 } /** - * Visits a variable element. This implementation simply - * calls {@code defaultAction(element, parameter)}. + * Visits a variable element. This implementation calls + * {@code defaultAction(element, parameter)}, unless the element is a + * {@code RESOURCE_VARIABLE}, in which case it calls + * {@code visitUnknown(element, parameter)} to retain 1.6 behaviour. * * @param element the variable element to visit. * @param parameter the additional parameter, specific to the visitor. * May be {@code null}. - * @return the result of {@code defaultAction(element, parameter)}. + * @return the result of {@code defaultAction(element, parameter)}, + * or {@code visitUnknown(element, parameter)} if the element + * is a {@code RESOURCE_VARIABLE}. */ @Override public R visitVariable(VariableElement element, P parameter) { + if (element.getKind() == ElementKind.RESOURCE_VARIABLE) + return visitUnknown(element, parameter); return defaultAction(element, parameter); } diff --git a/javax/lang/model/util/SimpleElementVisitor7.java b/javax/lang/model/util/SimpleElementVisitor7.java new file mode 100644 index 000000000..b4c43a1d3 --- /dev/null +++ b/javax/lang/model/util/SimpleElementVisitor7.java @@ -0,0 +1,113 @@ +/* SimpleElementVisitor7.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; + +import javax.lang.model.element.Element; +import javax.lang.model.element.ElementVisitor; +import javax.lang.model.element.VariableElement; + +/** + *

A simple implementation of {@link ElementVisitor} for the + * 1.7 version of the Java programming language + * ({@link SourceVersion#RELEASE_7}). Each {@code visitXYZ} method + * redirects to {@code defaultAction(element, parameter)}. + * Implementors may extend this class and provide alternative + * implementations of {@link #defaultAction(Element, P)} and + * the {@code visitXYZ} methods as appropriate.

+ *

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(Element,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.

+ * + * @param the return type of the visitor's methods. {@code Void} + * can be used where there is no return value. + * @param

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 SimpleElementVisitor7 extends SimpleElementVisitor6 +{ + + /** + * Constructs a new {@link SimpleElementVisitor7} with a {@code null} + * default value. + */ + protected SimpleElementVisitor7() + { + this(null); + } + + /** + * Constructs a new {@link SimpleElementVisitor7} with the specified + * default value. + * + * @param defaultValue the value to assign to {@link #DEFAULT_VALUE}. + */ + protected SimpleElementVisitor7(R defaultValue) + { + super(defaultValue); + } + + /** + * Visits a variable element. This implementation simply + * calls {@code defaultAction(element, parameter)}. + * + * @param element the variable element to visit. + * @param parameter the additional parameter, specific to the visitor. + * May be {@code null}. + * @return the result of {@code defaultAction(element, parameter)}. + */ + @Override + public R visitVariable(VariableElement element, P parameter) + { + return defaultAction(element, parameter); + } + +} + + diff --git a/javax/lang/model/util/SimpleTypeVisitor6.java b/javax/lang/model/util/SimpleTypeVisitor6.java index c41c77ece..4b6e050ee 100644 --- a/javax/lang/model/util/SimpleTypeVisitor6.java +++ b/javax/lang/model/util/SimpleTypeVisitor6.java @@ -85,7 +85,7 @@ public class SimpleTypeVisitor6 extends AbstractTypeVisitor6 protected final R DEFAULT_VALUE; /** - * Constructs a new {@link SimpleAnnotationValueVisitor6} with a {@code null} + * Constructs a new {@link SimpleTypeVisitor6} with a {@code null} * default value. */ protected SimpleTypeVisitor6() diff --git a/javax/lang/model/util/SimpleTypeVisitor7.java b/javax/lang/model/util/SimpleTypeVisitor7.java new file mode 100644 index 000000000..356820c2c --- /dev/null +++ b/javax/lang/model/util/SimpleTypeVisitor7.java @@ -0,0 +1,111 @@ +/* SimpleTypeVisitor7.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; + +import javax.lang.model.type.UnionType; + +/** + *

A simple implementation of {@link TypeVisitor} for the + * 1.7 version of the Java programming language + * ({@link SourceVersion#RELEASE_7}). Each {@code visitXYZ} method + * redirects to {@code defaultAction(type, parameter)}. + * Implementors may extend this class and provide alternative + * implementations of {@link #defaultAction(TypeMirror, P)} and + * the {@code visitXYZ} methods as appropriate.

+ *

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(TypeMirror,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.

+ * + * @param the return type of the visitor's methods. {@code Void} + * can be used where there is no return value. + * @param

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 SimpleTypeVisitor7 extends SimpleTypeVisitor6 +{ + + /** + * Constructs a new {@link SimpleTypeVisitor7} with a {@code null} + * default value. + */ + protected SimpleTypeVisitor7() + { + this(null); + } + + /** + * Constructs a new {@link SimpleTypeVisitor7} with the specified + * default value. + * + * @param defaultValue the value to assign to {@link #DEFAULT_VALUE}. + */ + protected SimpleTypeVisitor7(R defaultValue) + { + super(defaultValue); + } + + /** + * Visits a UnionType instance. This implementation simply + * calls {@code defaultAction(type, parameter)}. + * + * @param type the UnionType instance to visit. + * @param parameter the additional parameter, specific to the visitor. + * May be {@code null}. + * @return the result of {@code defaultAction(type, parameter)}. + */ + @Override + public R visitUnion(UnionType type, P parameter) + { + return defaultAction(type, parameter); + } + +} + + diff --git a/javax/lang/model/util/TypeKindVisitor7.java b/javax/lang/model/util/TypeKindVisitor7.java new file mode 100644 index 000000000..75d9dfd80 --- /dev/null +++ b/javax/lang/model/util/TypeKindVisitor7.java @@ -0,0 +1,116 @@ +/* TypeKindVisitor7.java -- A type 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; + +import javax.lang.model.type.UnionType; + +/** + *

An implementation of {@link TypeVisitor} for the + * 1.7 version of the Java programming language + * ({@link SourceVersion#RELEASE_7}) which redirects each + * {@code visitXYZ} method call to a more specific + * {@code visitXYZAsKind} method, depending on the kind + * of the first argument. For example, a call to + * {@code visitNoType} redirects to {@code visitNoTypeAsNone}, + * {@code visitNoTypeAsPackage} or {@code visitNoTypeAsVoid}, + * depending on the type of {@code NoType} supplied. {@code visitXYZAsKind} then + * redirects to {@code defaultAction(element, parameter)}. + * Implementors may extend this class and provide alternative + * implementations of {@link #defaultAction(TypeMirror, P)} and + * the {@code visitXYZKind} methods as appropriate.

+ *

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(TypeMirror,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.

+ * + * @param the return type of the visitor's methods. {@code Void} + * can be used where there is no return value. + * @param

the type of the additional parameter supplied to the visitor's + * methods. {@code Void} can be used if this is not needed. + * + * @author Andrew John Hughes (gnu_andrew@member.fsf.org) + * @since 1.7 + */ +@SupportedSourceVersion(SourceVersion.RELEASE_7) +public class TypeKindVisitor7 extends TypeKindVisitor6 +{ + + /** + * Constructs a new {@link TypeKindVisitor7} with a {@code null} + * default value. + */ + protected TypeKindVisitor7() + { + this(null); + } + + /** + * Constructs a new {@link TypeKindVisitor7} with the specified + * default value. + * + * @param defaultValue the value to assign to {@link SimpleTypeVisitor6#DEFAULT_VALUE}. + */ + protected TypeKindVisitor7(R defaultValue) + { + super(defaultValue); + } + + /** + * Visits a {@code UnionType} instance. This implementation + * simply calls {@code defaultAction(type, parameter)}. + * + * @param type the type to visit. + * @param parameter the additional parameter, specific to the visitor. + * May be {@code null}. + * @return the result of {@code defaultAction(type, parameter)}. + */ + public R visitUnion(UnionType type, P parameter) + { + return defaultAction(type, parameter); + } + +} + + -- cgit v1.2.1