langtools/src/java.compiler/share/classes/javax/lang/model/util/SimpleElementVisitor9.java
equal
deleted
inserted
replaced
1 /* |
1 /* |
2 * Copyright (c) 2011, 2014, Oracle and/or its affiliates. All rights reserved. |
2 * Copyright (c) 2011, 2015, Oracle and/or its affiliates. All rights reserved. |
3 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. |
3 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. |
4 * |
4 * |
5 * This code is free software; you can redistribute it and/or modify it |
5 * This code is free software; you can redistribute it and/or modify it |
6 * under the terms of the GNU General Public License version 2 only, as |
6 * under the terms of the GNU General Public License version 2 only, as |
7 * published by the Free Software Foundation. Oracle designates this |
7 * published by the Free Software Foundation. Oracle designates this |
25 |
25 |
26 package javax.lang.model.util; |
26 package javax.lang.model.util; |
27 |
27 |
28 import javax.annotation.processing.SupportedSourceVersion; |
28 import javax.annotation.processing.SupportedSourceVersion; |
29 import javax.lang.model.SourceVersion; |
29 import javax.lang.model.SourceVersion; |
|
30 import javax.lang.model.element.ModuleElement; |
30 import static javax.lang.model.SourceVersion.*; |
31 import static javax.lang.model.SourceVersion.*; |
31 |
32 |
32 /** |
33 /** |
33 * A simple visitor of program elements with default behavior |
34 * A simple visitor of program elements with default behavior |
34 * appropriate for the {@link SourceVersion#RELEASE_9 RELEASE_9} |
35 * appropriate for the {@link SourceVersion#RELEASE_9 RELEASE_9} |
88 * @param defaultValue the value to assign to {@link #DEFAULT_VALUE} |
89 * @param defaultValue the value to assign to {@link #DEFAULT_VALUE} |
89 */ |
90 */ |
90 protected SimpleElementVisitor9(R defaultValue){ |
91 protected SimpleElementVisitor9(R defaultValue){ |
91 super(defaultValue); |
92 super(defaultValue); |
92 } |
93 } |
|
94 |
|
95 /** |
|
96 * Visits a {@code ModuleElement} by calling {@code |
|
97 * defaultAction}. |
|
98 * |
|
99 * @param e the element to visit |
|
100 * @param p a visitor-specified parameter |
|
101 * @return the result of {@code defaultAction} |
|
102 */ |
|
103 @Override |
|
104 public R visitModule(ModuleElement e, P p) { |
|
105 return defaultAction(e, p); |
|
106 } |
93 } |
107 } |