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

changeset 851
cad51b6eb7a6
parent 575
9a7c998bf2fc
child 969
8cc5b440fdde
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
32 32
33 /** 33 /**
34 * A simple visitor of types with default behavior appropriate for the 34 * A simple visitor of types with default behavior appropriate for the
35 * {@link SourceVersion#RELEASE_7 RELEASE_7} source version. 35 * {@link SourceVersion#RELEASE_7 RELEASE_7} source version.
36 * 36 *
37 * Visit methods corresponding to {@code RELEASE_7} language 37 * Visit methods corresponding to {@code RELEASE_7} and earlier
38 * constructs call {@link #defaultAction}, passing their arguments to 38 * language constructs call {@link #defaultAction defaultAction},
39 * {@code defaultAction}'s corresponding parameters. 39 * passing their arguments to {@code defaultAction}'s corresponding
40 * parameters.
40 * 41 *
41 * <p> Methods in this class may be overridden subject to their 42 * <p> Methods in this class may be overridden subject to their
42 * general contract. Note that annotating methods in concrete 43 * general contract. Note that annotating methods in concrete
43 * subclasses with {@link java.lang.Override @Override} will help 44 * subclasses with {@link java.lang.Override @Override} will help
44 * ensure that methods are overridden as intended. 45 * ensure that methods are overridden as intended.
86 * @param defaultValue the value to assign to {@link #DEFAULT_VALUE} 87 * @param defaultValue the value to assign to {@link #DEFAULT_VALUE}
87 */ 88 */
88 protected SimpleTypeVisitor7(R defaultValue){ 89 protected SimpleTypeVisitor7(R defaultValue){
89 super(defaultValue); 90 super(defaultValue);
90 } 91 }
92
93 /**
94 * This implementation visits a {@code DisjunctiveType} by calling
95 * {@code defaultAction}.
96 *
97 * @param t {@inheritDoc}
98 * @param p {@inheritDoc}
99 * @return the result of {@code defaultAction}
100 */
101 @Override
102 public R visitDisjunctive(DisjunctiveType t, P p) {
103 return defaultAction(t, p);
104 }
91 } 105 }

mercurial