src/share/classes/javax/lang/model/util/SimpleElementVisitor7.java

changeset 851
cad51b6eb7a6
parent 575
9a7c998bf2fc
child 1054
111bbf1ad913
equal deleted inserted replaced
850:2ab47c4cd618 851:cad51b6eb7a6
1 /* 1 /*
2 * Copyright (c) 2010, Oracle and/or its affiliates. All rights reserved. 2 * Copyright (c) 2010, 2011, 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
34 /** 34 /**
35 * A simple visitor of program elements with default behavior 35 * A simple visitor of program elements with default behavior
36 * appropriate for the {@link SourceVersion#RELEASE_7 RELEASE_7} 36 * appropriate for the {@link SourceVersion#RELEASE_7 RELEASE_7}
37 * source version. 37 * source version.
38 * 38 *
39 * Visit methods corresponding to {@code RELEASE_7} language 39 * Visit methods corresponding to {@code RELEASE_7} and earlier
40 * constructs call {@link #defaultAction}, passing their arguments to 40 * language constructs call {@link #defaultAction defaultAction},
41 * {@code defaultAction}'s corresponding parameters. 41 * passing their arguments to {@code defaultAction}'s corresponding
42 * parameters.
42 * 43 *
43 * <p> Methods in this class may be overridden subject to their 44 * <p> Methods in this class may be overridden subject to their
44 * general contract. Note that annotating methods in concrete 45 * general contract. Note that annotating methods in concrete
45 * subclasses with {@link java.lang.Override @Override} will help 46 * subclasses with {@link java.lang.Override @Override} will help
46 * ensure that methods are overridden as intended. 47 * ensure that methods are overridden as intended.
87 * @param defaultValue the value to assign to {@link #DEFAULT_VALUE} 88 * @param defaultValue the value to assign to {@link #DEFAULT_VALUE}
88 */ 89 */
89 protected SimpleElementVisitor7(R defaultValue){ 90 protected SimpleElementVisitor7(R defaultValue){
90 super(defaultValue); 91 super(defaultValue);
91 } 92 }
93
94 /**
95 * This implementation calls {@code defaultAction}.
96 *
97 * @param e {@inheritDoc}
98 * @param p {@inheritDoc}
99 * @return the result of {@code defaultAction}
100 */
101 @Override
102 public R visitVariable(VariableElement e, P p) {
103 return defaultAction(e, p);
104 }
92 } 105 }

mercurial