< prev index next >

src/java.compiler/share/classes/javax/lang/model/util/SimpleAnnotationValueVisitor6.java

Print this page




  96     protected SimpleAnnotationValueVisitor6() {
  97         super();
  98         DEFAULT_VALUE = null;
  99     }
 100 
 101     /**
 102      * Constructor for concrete subclasses; uses the argument for the
 103      * default value.
 104      *
 105      * @param defaultValue the value to assign to {@link #DEFAULT_VALUE}
 106      * @deprecated Release 6 is obsolete; update to a visitor for a newer
 107      * release level.
 108      */
 109     @Deprecated(since="9")
 110     protected SimpleAnnotationValueVisitor6(R defaultValue) {
 111         super();
 112         DEFAULT_VALUE = defaultValue;
 113     }
 114 
 115     /**
 116      * The default action for visit methods.  The implementation in
 117      * this class just returns {@link #DEFAULT_VALUE}; subclasses will
 118      * commonly override this method.

 119      *
 120      * @param o the value of the annotation
 121      * @param p a visitor-specified parameter
 122      * @return {@code DEFAULT_VALUE} unless overridden
 123      */
 124     protected R defaultAction(Object o, P p) {
 125         return DEFAULT_VALUE;
 126     }
 127 
 128     /**
 129      * {@inheritDoc} This implementation calls {@code defaultAction}.


 130      *
 131      * @param b {@inheritDoc}
 132      * @param p {@inheritDoc}
 133      * @return  the result of {@code defaultAction}
 134      */
 135     public R visitBoolean(boolean b, P p) {
 136         return defaultAction(b, p);
 137     }
 138 
 139     /**
 140      * {@inheritDoc} This implementation calls {@code defaultAction}.


 141      *
 142      * @param b {@inheritDoc}
 143      * @param p {@inheritDoc}
 144      * @return  the result of {@code defaultAction}
 145      */
 146     public R visitByte(byte b, P p) {
 147         return defaultAction(b, p);
 148     }
 149 
 150     /**
 151      * {@inheritDoc} This implementation calls {@code defaultAction}.


 152      *
 153      * @param c {@inheritDoc}
 154      * @param p {@inheritDoc}
 155      * @return  the result of {@code defaultAction}
 156      */
 157     public R visitChar(char c, P p) {
 158         return defaultAction(c, p);
 159     }
 160 
 161     /**
 162      * {@inheritDoc} This implementation calls {@code defaultAction}.



 163      *
 164      * @param d {@inheritDoc}
 165      * @param p {@inheritDoc}
 166      * @return  the result of {@code defaultAction}
 167      */
 168     public R visitDouble(double d, P p) {
 169         return defaultAction(d, p);
 170     }
 171 
 172     /**
 173      * {@inheritDoc} This implementation calls {@code defaultAction}.



 174      *
 175      * @param f {@inheritDoc}
 176      * @param p {@inheritDoc}
 177      * @return  the result of {@code defaultAction}
 178      */
 179     public R visitFloat(float f, P p) {
 180         return defaultAction(f, p);
 181     }
 182 
 183     /**
 184      * {@inheritDoc} This implementation calls {@code defaultAction}.


 185      *
 186      * @param i {@inheritDoc}
 187      * @param p {@inheritDoc}
 188      * @return  the result of {@code defaultAction}
 189      */
 190     public R visitInt(int i, P p) {
 191         return defaultAction(i, p);
 192     }
 193 
 194     /**
 195      * {@inheritDoc} This implementation calls {@code defaultAction}.


 196      *
 197      * @param i {@inheritDoc}
 198      * @param p {@inheritDoc}
 199      * @return  the result of {@code defaultAction}
 200      */
 201     public R visitLong(long i, P p) {
 202         return defaultAction(i, p);
 203     }
 204 
 205     /**
 206      * {@inheritDoc} This implementation calls {@code defaultAction}.


 207      *
 208      * @param s {@inheritDoc}
 209      * @param p {@inheritDoc}
 210      * @return  the result of {@code defaultAction}
 211      */
 212     public R visitShort(short s, P p) {
 213         return defaultAction(s, p);
 214     }
 215 
 216     /**
 217      * {@inheritDoc} This implementation calls {@code defaultAction}.


 218      *
 219      * @param s {@inheritDoc}
 220      * @param p {@inheritDoc}
 221      * @return  the result of {@code defaultAction}
 222      */
 223     public R visitString(String s, P p) {
 224         return defaultAction(s, p);
 225     }
 226 
 227     /**
 228      * {@inheritDoc} This implementation calls {@code defaultAction}.


 229      *
 230      * @param t {@inheritDoc}
 231      * @param p {@inheritDoc}
 232      * @return  the result of {@code defaultAction}
 233      */
 234     public R visitType(TypeMirror t, P p) {
 235         return defaultAction(t, p);
 236     }
 237 
 238     /**
 239      * {@inheritDoc} This implementation calls {@code defaultAction}.


 240      *
 241      * @param c {@inheritDoc}
 242      * @param p {@inheritDoc}
 243      * @return  the result of {@code defaultAction}
 244      */
 245     public R visitEnumConstant(VariableElement c, P p) {
 246         return defaultAction(c, p);
 247     }
 248 
 249     /**
 250      * {@inheritDoc} This implementation calls {@code defaultAction}.


 251      *
 252      * @param a {@inheritDoc}
 253      * @param p {@inheritDoc}
 254      * @return  the result of {@code defaultAction}
 255      */
 256     public R visitAnnotation(AnnotationMirror a, P p) {
 257         return defaultAction(a, p);
 258     }
 259 
 260     /**
 261      * {@inheritDoc} This implementation calls {@code defaultAction}.


 262      *
 263      * @param vals {@inheritDoc}
 264      * @param p {@inheritDoc}
 265      * @return  the result of {@code defaultAction}
 266      */
 267     public R visitArray(List<? extends AnnotationValue> vals, P p) {
 268         return defaultAction(vals, p);
 269     }
 270 }


  96     protected SimpleAnnotationValueVisitor6() {
  97         super();
  98         DEFAULT_VALUE = null;
  99     }
 100 
 101     /**
 102      * Constructor for concrete subclasses; uses the argument for the
 103      * default value.
 104      *
 105      * @param defaultValue the value to assign to {@link #DEFAULT_VALUE}
 106      * @deprecated Release 6 is obsolete; update to a visitor for a newer
 107      * release level.
 108      */
 109     @Deprecated(since="9")
 110     protected SimpleAnnotationValueVisitor6(R defaultValue) {
 111         super();
 112         DEFAULT_VALUE = defaultValue;
 113     }
 114 
 115     /**
 116      * The default action for visit methods.
 117      * 
 118      * @implSpec The implementation in this class just returns {@link
 119      * #DEFAULT_VALUE}; subclasses will commonly override this method.
 120      *
 121      * @param o the value of the annotation
 122      * @param p a visitor-specified parameter
 123      * @return {@code DEFAULT_VALUE} unless overridden
 124      */
 125     protected R defaultAction(Object o, P p) {
 126         return DEFAULT_VALUE;
 127     }
 128 
 129     /**
 130      * {@inheritDoc}
 131      *
 132      * @implSpec This implementation calls {@code defaultAction}.
 133      *
 134      * @param b {@inheritDoc}
 135      * @param p {@inheritDoc}
 136      * @return  the result of {@code defaultAction}
 137      */
 138     public R visitBoolean(boolean b, P p) {
 139         return defaultAction(b, p);
 140     }
 141 
 142     /**
 143      * {@inheritDoc}
 144      *
 145      * @implSpec This implementation calls {@code defaultAction}.
 146      *
 147      * @param b {@inheritDoc}
 148      * @param p {@inheritDoc}
 149      * @return  the result of {@code defaultAction}
 150      */
 151     public R visitByte(byte b, P p) {
 152         return defaultAction(b, p);
 153     }
 154 
 155     /**
 156      * {@inheritDoc}
 157      *
 158      * @implSpec This implementation calls {@code defaultAction}.
 159      *
 160      * @param c {@inheritDoc}
 161      * @param p {@inheritDoc}
 162      * @return  the result of {@code defaultAction}
 163      */
 164     public R visitChar(char c, P p) {
 165         return defaultAction(c, p);
 166     }
 167 
 168     /**
 169      * {@inheritDoc}
 170      *
 171      * @implSpec This implementation calls {@code defaultAction}.
 172      *
 173      *
 174      * @param d {@inheritDoc}
 175      * @param p {@inheritDoc}
 176      * @return  the result of {@code defaultAction}
 177      */
 178     public R visitDouble(double d, P p) {
 179         return defaultAction(d, p);
 180     }
 181 
 182     /**
 183      * {@inheritDoc}
 184      *
 185      * @implSpec This implementation calls {@code defaultAction}.
 186      *
 187      *
 188      * @param f {@inheritDoc}
 189      * @param p {@inheritDoc}
 190      * @return  the result of {@code defaultAction}
 191      */
 192     public R visitFloat(float f, P p) {
 193         return defaultAction(f, p);
 194     }
 195 
 196     /**
 197      * {@inheritDoc}
 198      *
 199      * @implSpec This implementation calls {@code defaultAction}.
 200      *
 201      * @param i {@inheritDoc}
 202      * @param p {@inheritDoc}
 203      * @return  the result of {@code defaultAction}
 204      */
 205     public R visitInt(int i, P p) {
 206         return defaultAction(i, p);
 207     }
 208 
 209     /**
 210      * {@inheritDoc}
 211      *
 212      * @implSpec This implementation calls {@code defaultAction}.
 213      *
 214      * @param i {@inheritDoc}
 215      * @param p {@inheritDoc}
 216      * @return  the result of {@code defaultAction}
 217      */
 218     public R visitLong(long i, P p) {
 219         return defaultAction(i, p);
 220     }
 221 
 222     /**
 223      * {@inheritDoc}
 224      *
 225      * @implSpec This implementation calls {@code defaultAction}.
 226      *
 227      * @param s {@inheritDoc}
 228      * @param p {@inheritDoc}
 229      * @return  the result of {@code defaultAction}
 230      */
 231     public R visitShort(short s, P p) {
 232         return defaultAction(s, p);
 233     }
 234 
 235     /**
 236      * {@inheritDoc}
 237      *
 238      * @implSpec This implementation calls {@code defaultAction}.
 239      *
 240      * @param s {@inheritDoc}
 241      * @param p {@inheritDoc}
 242      * @return  the result of {@code defaultAction}
 243      */
 244     public R visitString(String s, P p) {
 245         return defaultAction(s, p);
 246     }
 247 
 248     /**
 249      * {@inheritDoc}
 250      *
 251      * @implSpec This implementation calls {@code defaultAction}.
 252      *
 253      * @param t {@inheritDoc}
 254      * @param p {@inheritDoc}
 255      * @return  the result of {@code defaultAction}
 256      */
 257     public R visitType(TypeMirror t, P p) {
 258         return defaultAction(t, p);
 259     }
 260 
 261     /**
 262      * {@inheritDoc}
 263      *
 264      * @implSpec This implementation calls {@code defaultAction}.
 265      *
 266      * @param c {@inheritDoc}
 267      * @param p {@inheritDoc}
 268      * @return  the result of {@code defaultAction}
 269      */
 270     public R visitEnumConstant(VariableElement c, P p) {
 271         return defaultAction(c, p);
 272     }
 273 
 274     /**
 275      * {@inheritDoc}
 276      *
 277      * @implSpec This implementation calls {@code defaultAction}.
 278      *
 279      * @param a {@inheritDoc}
 280      * @param p {@inheritDoc}
 281      * @return  the result of {@code defaultAction}
 282      */
 283     public R visitAnnotation(AnnotationMirror a, P p) {
 284         return defaultAction(a, p);
 285     }
 286 
 287     /**
 288      * {@inheritDoc}
 289      *
 290      * @implSpec This implementation calls {@code defaultAction}.
 291      *
 292      * @param vals {@inheritDoc}
 293      * @param p {@inheritDoc}
 294      * @return  the result of {@code defaultAction}
 295      */
 296     public R visitArray(List<? extends AnnotationValue> vals, P p) {
 297         return defaultAction(vals, p);
 298     }
 299 }
< prev index next >