Skip to content

Commit 2a62d5d

Browse files
committed
8256917: Use combo @returns tag in java.compiler javadoc
Reviewed-by: jjg, iris
1 parent b29f9cd commit 2a62d5d

33 files changed

+161
-329
lines changed

src/java.compiler/share/classes/javax/annotation/processing/AbstractProcessor.java

Lines changed: 4 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/*
2-
* Copyright (c) 2005, 2019, Oracle and/or its affiliates. All rights reserved.
2+
* Copyright (c) 2005, 2020, Oracle and/or its affiliates. All rights reserved.
33
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
44
*
55
* This code is free software; you can redistribute it and/or modify it
@@ -171,7 +171,7 @@ public abstract boolean process(Set<? extends TypeElement> annotations,
171171
RoundEnvironment roundEnv);
172172

173173
/**
174-
* Returns an empty iterable of completions.
174+
* {@return an empty iterable of completions}
175175
*
176176
* @param element {@inheritDoc}
177177
* @param annotation {@inheritDoc}
@@ -186,11 +186,8 @@ public Iterable<? extends Completion> getCompletions(Element element,
186186
}
187187

188188
/**
189-
* Returns {@code true} if this object has been {@linkplain #init
190-
* initialized}, {@code false} otherwise.
191-
*
192-
* @return {@code true} if this object has been initialized,
193-
* {@code false} otherwise.
189+
* {@return {@code true} if this object has been {@linkplain #init
190+
* initialized}, {@code false} otherwise}
194191
*/
195192
protected synchronized boolean isInitialized() {
196193
return initialized;

src/java.compiler/share/classes/javax/annotation/processing/Completion.java

Lines changed: 3 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/*
2-
* Copyright (c) 2006, Oracle and/or its affiliates. All rights reserved.
2+
* Copyright (c) 2006, 2020, Oracle and/or its affiliates. All rights reserved.
33
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
44
*
55
* This code is free software; you can redistribute it and/or modify it
@@ -38,14 +38,12 @@
3838
public interface Completion {
3939

4040
/**
41-
* Returns the text of the suggested completion.
42-
* @return the text of the suggested completion.
41+
* {@return the text of the suggested completion}
4342
*/
4443
String getValue();
4544

4645
/**
47-
* Returns an informative message about the completion.
48-
* @return an informative message about the completion.
46+
* {@return an informative message about the completion}
4947
*/
5048
String getMessage();
5149
}

src/java.compiler/share/classes/javax/annotation/processing/Completions.java

Lines changed: 3 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/*
2-
* Copyright (c) 2006, 2012, Oracle and/or its affiliates. All rights reserved.
2+
* Copyright (c) 2006, 2020, Oracle and/or its affiliates. All rights reserved.
33
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
44
*
55
* This code is free software; you can redistribute it and/or modify it
@@ -65,21 +65,19 @@ public String toString() {
6565
}
6666

6767
/**
68-
* Returns a completion of the value and message.
68+
* {@return a completion of the value and message}
6969
*
7070
* @param value the text of the completion
7171
* @param message a message about the completion
72-
* @return a completion of the provided value and message
7372
*/
7473
public static Completion of(String value, String message) {
7574
return new SimpleCompletion(value, message);
7675
}
7776

7877
/**
79-
* Returns a completion of the value and an empty message
78+
* {@return a completion of the value and an empty message}
8079
*
8180
* @param value the text of the completion
82-
* @return a completion of the value and an empty message
8381
*/
8482
public static Completion of(String value) {
8583
return new SimpleCompletion(value, "");

src/java.compiler/share/classes/javax/annotation/processing/ProcessingEnvironment.java

Lines changed: 15 additions & 30 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/*
2-
* Copyright (c) 2005, 2019, Oracle and/or its affiliates. All rights reserved.
2+
* Copyright (c) 2005, 2020, Oracle and/or its affiliates. All rights reserved.
33
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
44
*
55
* This code is free software; you can redistribute it and/or modify it
@@ -60,8 +60,8 @@
6060
*/
6161
public interface ProcessingEnvironment {
6262
/**
63-
* Returns the processor-specific options passed to the annotation
64-
* processing tool. Options are returned in the form of a map from
63+
* {@return the processor-specific options passed to the annotation
64+
* processing tool} Options are returned in the form of a map from
6565
* option name to option value. For an option with no value, the
6666
* corresponding value in the map is {@code null}.
6767
*
@@ -74,61 +74,46 @@ public interface ProcessingEnvironment {
7474
* A given implementation may also provide implementation-specific
7575
* ways of finding options passed to the tool in addition to the
7676
* processor-specific options.
77-
*
78-
* @return the processor-specific options passed to the tool
7977
*/
8078
Map<String,String> getOptions();
8179

8280
/**
83-
* Returns the messager used to report errors, warnings, and other
84-
* notices.
85-
*
86-
* @return the messager
81+
* {@return the messager used to report errors, warnings, and other
82+
* notices}
8783
*/
8884
Messager getMessager();
8985

9086
/**
91-
* Returns the filer used to create new source, class, or auxiliary
92-
* files.
93-
*
94-
* @return the filer
87+
* {@return the filer used to create new source, class, or auxiliary
88+
* files}
9589
*/
9690
Filer getFiler();
9791

9892
/**
99-
* Returns an implementation of some utility methods for
100-
* operating on elements
101-
*
102-
* @return element utilities
93+
* {@return an implementation of some utility methods for
94+
* operating on elements}
10395
*/
10496
Elements getElementUtils();
10597

10698
/**
107-
* Returns an implementation of some utility methods for
108-
* operating on types.
109-
*
110-
* @return type utilities
99+
* {@return an implementation of some utility methods for
100+
* operating on types}
111101
*/
112102
Types getTypeUtils();
113103

114104
/**
115-
* Returns the source version that any generated {@linkplain
105+
* {@return the source version that any generated {@linkplain
116106
* Filer#createSourceFile source} and {@linkplain
117-
* Filer#createClassFile class} files should conform to.
107+
* Filer#createClassFile class} files should conform to}
118108
*
119-
* @return the source version to which generated source and class
120-
* files should conform to
121109
* @see Processor#getSupportedSourceVersion
122110
*/
123111
SourceVersion getSourceVersion();
124112

125113
/**
126-
* Returns the current locale or {@code null} if no locale is in
127-
* effect. The locale can be be used to provide localized
114+
* {@return the current locale or {@code null} if no locale is in
115+
* effect} The locale can be be used to provide localized
128116
* {@linkplain Messager messages}.
129-
*
130-
* @return the current locale or {@code null} if no locale is in
131-
* effect
132117
*/
133118
Locale getLocale();
134119

src/java.compiler/share/classes/javax/annotation/processing/Processor.java

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -305,11 +305,9 @@ public interface Processor {
305305
Set<String> getSupportedAnnotationTypes();
306306

307307
/**
308-
* Returns the latest source version supported by this annotation
309-
* processor.
308+
* {@return the latest source version supported by this annotation
309+
* processor}
310310
*
311-
* @return the latest source version supported by this annotation
312-
* processor.
313311
* @see javax.annotation.processing.SupportedSourceVersion
314312
* @see ProcessingEnvironment#getSourceVersion
315313
*/

src/java.compiler/share/classes/javax/annotation/processing/RoundEnvironment.java

Lines changed: 5 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/*
2-
* Copyright (c) 2005, 2019, Oracle and/or its affiliates. All rights reserved.
2+
* Copyright (c) 2005, 2020, Oracle and/or its affiliates. All rights reserved.
33
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
44
*
55
* This code is free software; you can redistribute it and/or modify it
@@ -45,22 +45,15 @@
4545
*/
4646
public interface RoundEnvironment {
4747
/**
48-
* Returns {@code true} if types generated by this round will not
48+
* {@return {@code true} if types generated by this round will not
4949
* be subject to a subsequent round of annotation processing;
50-
* returns {@code false} otherwise.
51-
*
52-
* @return {@code true} if types generated by this round will not
53-
* be subject to a subsequent round of annotation processing;
54-
* returns {@code false} otherwise
50+
* returns {@code false} otherwise}
5551
*/
5652
boolean processingOver();
5753

5854
/**
59-
* Returns {@code true} if an error was raised in the prior round
60-
* of processing; returns {@code false} otherwise.
61-
*
62-
* @return {@code true} if an error was raised in the prior round
63-
* of processing; returns {@code false} otherwise
55+
* {@return {@code true} if an error was raised in the prior round
56+
* of processing; returns {@code false} otherwise}
6457
*/
6558
boolean errorRaised();
6659

src/java.compiler/share/classes/javax/annotation/processing/SupportedAnnotationTypes.java

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/*
2-
* Copyright (c) 2005, 2013, Oracle and/or its affiliates. All rights reserved.
2+
* Copyright (c) 2005, 2020, Oracle and/or its affiliates. All rights reserved.
33
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
44
*
55
* This code is free software; you can redistribute it and/or modify it
@@ -48,8 +48,7 @@
4848
@Retention(RUNTIME)
4949
public @interface SupportedAnnotationTypes {
5050
/**
51-
* Returns the names of the supported annotation types.
52-
* @return the names of the supported annotation types
51+
* {@return the names of the supported annotation types}
5352
*/
5453
String [] value();
5554
}

src/java.compiler/share/classes/javax/annotation/processing/SupportedOptions.java

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/*
2-
* Copyright (c) 2005, 2013, Oracle and/or its affiliates. All rights reserved.
2+
* Copyright (c) 2005, 2020, Oracle and/or its affiliates. All rights reserved.
33
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
44
*
55
* This code is free software; you can redistribute it and/or modify it
@@ -47,8 +47,7 @@
4747
@Retention(RUNTIME)
4848
public @interface SupportedOptions {
4949
/**
50-
* Returns the supported options.
51-
* @return the supported options
50+
* {@return the supported options}
5251
*/
5352
String [] value();
5453
}

src/java.compiler/share/classes/javax/annotation/processing/SupportedSourceVersion.java

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/*
2-
* Copyright (c) 2005, 2013, Oracle and/or its affiliates. All rights reserved.
2+
* Copyright (c) 2005, 2020, Oracle and/or its affiliates. All rights reserved.
33
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
44
*
55
* This code is free software; you can redistribute it and/or modify it
@@ -48,8 +48,7 @@
4848
@Retention(RUNTIME)
4949
public @interface SupportedSourceVersion {
5050
/**
51-
* Returns the latest supported source version.
52-
* @return the latest supported source version
51+
* {@return the latest supported source version}
5352
*/
5453
SourceVersion value();
5554
}

src/java.compiler/share/classes/javax/lang/model/AnnotatedConstruct.java

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -145,8 +145,8 @@ public interface AnnotatedConstruct {
145145
List<? extends AnnotationMirror> getAnnotationMirrors();
146146

147147
/**
148-
* Returns this construct's annotation of the specified type if
149-
* such an annotation is <em>present</em>, else {@code null}.
148+
* {@return this construct's annotation of the specified type if
149+
* such an annotation is <em>present</em>, else {@code null}}
150150
*
151151
* <p> The annotation returned by this method could contain an element
152152
* whose value is of type {@code Class}.
@@ -176,8 +176,6 @@ public interface AnnotatedConstruct {
176176
* @param <A> the annotation type
177177
* @param annotationType the {@code Class} object corresponding to
178178
* the annotation type
179-
* @return this construct's annotation for the specified
180-
* annotation type if present, else {@code null}
181179
*
182180
* @see #getAnnotationMirrors()
183181
* @see java.lang.reflect.AnnotatedElement#getAnnotation

src/java.compiler/share/classes/javax/lang/model/SourceVersion.java

Lines changed: 3 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -229,9 +229,7 @@ public enum SourceVersion {
229229
// behavior of latest() and latestSupported() must be updated too.
230230

231231
/**
232-
* Returns the latest source version that can be modeled.
233-
*
234-
* @return the latest source version that can be modeled
232+
* {@return the latest source version that can be modeled}
235233
*/
236234
public static SourceVersion latest() {
237235
return RELEASE_16;
@@ -254,8 +252,8 @@ private static SourceVersion getLatestSupported() {
254252
}
255253

256254
/**
257-
* Returns the latest source version fully supported by the
258-
* current execution environment. {@code RELEASE_9} or later must
255+
* {@return the latest source version fully supported by the
256+
* current execution environment} {@code RELEASE_9} or later must
259257
* be returned.
260258
*
261259
* @apiNote This method is included alongside {@link latest} to
@@ -272,8 +270,6 @@ private static SourceVersion getLatestSupported() {
272270
* current execution environment, the processor should only use
273271
* platform features up to the {@code latestSupported} release,
274272
* which may be earlier than the {@code latest} release.
275-
*
276-
* @return the latest source version that is fully supported
277273
*/
278274
public static SourceVersion latestSupported() {
279275
return latestSupported;

src/java.compiler/share/classes/javax/lang/model/element/AnnotationMirror.java

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/*
2-
* Copyright (c) 2005, 2006, Oracle and/or its affiliates. All rights reserved.
2+
* Copyright (c) 2005, 2020, Oracle and/or its affiliates. All rights reserved.
33
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
44
*
55
* This code is free software; you can redistribute it and/or modify it
@@ -44,9 +44,7 @@
4444
public interface AnnotationMirror {
4545

4646
/**
47-
* Returns the type of this annotation.
48-
*
49-
* @return the type of this annotation
47+
* {@return the type of this annotation}
5048
*/
5149
DeclaredType getAnnotationType();
5250

src/java.compiler/share/classes/javax/lang/model/element/AnnotationValue.java

Lines changed: 3 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/*
2-
* Copyright (c) 2005, 2012, Oracle and/or its affiliates. All rights reserved.
2+
* Copyright (c) 2005, 2020, Oracle and/or its affiliates. All rights reserved.
33
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
44
*
55
* This code is free software; you can redistribute it and/or modify it
@@ -45,18 +45,14 @@
4545
public interface AnnotationValue {
4646

4747
/**
48-
* Returns the value.
49-
*
50-
* @return the value
48+
* {@return the value}
5149
*/
5250
Object getValue();
5351

5452
/**
55-
* Returns a string representation of this value.
53+
* {@return a string representation of this value}
5654
* This is returned in a form suitable for representing this value
5755
* in the source code of an annotation.
58-
*
59-
* @return a string representation of this value
6056
*/
6157
String toString();
6258

0 commit comments

Comments
 (0)