Skip to content

Commit 6e18f80

Browse files
committed
Fix javadoc generation
1 parent 7f56f25 commit 6e18f80

File tree

10 files changed

+32
-15
lines changed

10 files changed

+32
-15
lines changed

src/main/java/com/exaroton/api/APIRequest.java

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,7 @@
1313
public abstract class APIRequest<Response> {
1414
/**
1515
* Build the HttpRequest
16+
* @param gson gson instance
1617
* @param builder HttpRequest builder with preconfigured options
1718
* @param baseUrl base URL
1819
* @return HttpRequest

src/main/java/com/exaroton/api/APIResponse.java

Lines changed: 20 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -2,11 +2,13 @@
22

33
import com.google.gson.Gson;
44
import com.google.gson.reflect.TypeToken;
5+
import org.jetbrains.annotations.NotNull;
56

67
import java.net.http.HttpResponse;
78
import java.nio.ByteBuffer;
89
import java.nio.charset.StandardCharsets;
910
import java.util.List;
11+
import java.util.Objects;
1012
import java.util.concurrent.CompletableFuture;
1113
import java.util.concurrent.CompletionException;
1214
import java.util.concurrent.CompletionStage;
@@ -31,12 +33,18 @@ public class APIResponse<Datatype> {
3133

3234
/**
3335
* Create a BodyHandler for APIResponse
34-
* @param gson gson instance
35-
* @param token type token of the response data
36+
*
37+
* @param client exaroton client
38+
* @param gson gson instance
39+
* @param token type token of the response data
40+
* @param <T> response data type
3641
* @return BodyHandler
37-
* @param <T> response data type
3842
*/
39-
public static <T> HttpResponse.BodyHandler<APIResponse<T>> bodyHandler(ExarotonClient client, Gson gson, TypeToken<APIResponse<T>> token) {
43+
public static <T> HttpResponse.BodyHandler<APIResponse<T>> bodyHandler(
44+
@NotNull ExarotonClient client,
45+
@NotNull Gson gson,
46+
@NotNull TypeToken<APIResponse<T>> token
47+
) {
4048
return responseInfo -> new BodySubscriber<>(client, gson, token);
4149
}
4250

@@ -81,10 +89,14 @@ private static final class BodySubscriber<T> implements HttpResponse.BodySubscri
8189
private final TypeToken<APIResponse<T>> token;
8290
private final HttpResponse.BodySubscriber<String> parent;
8391

84-
private BodySubscriber(ExarotonClient client, Gson gson, TypeToken<APIResponse<T>> token) {
85-
this.client = client;
86-
this.gson = gson;
87-
this.token = token;
92+
private BodySubscriber(
93+
@NotNull ExarotonClient client,
94+
@NotNull Gson gson,
95+
@NotNull TypeToken<APIResponse<T>> token
96+
) {
97+
this.client = Objects.requireNonNull(client);
98+
this.gson = Objects.requireNonNull(gson);
99+
this.token = Objects.requireNonNull(token);
88100
this.parent = HttpResponse.BodySubscribers.ofString(StandardCharsets.UTF_8);
89101
}
90102

src/main/java/com/exaroton/api/Initializable.java

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,7 @@
22

33
import com.google.gson.Gson;
44
import org.jetbrains.annotations.ApiStatus;
5+
import org.jetbrains.annotations.NotNull;
56

67
/**
78
* Interface for objects that can be initialized
@@ -14,5 +15,5 @@ public interface Initializable {
1415
* @param client exaroton client
1516
* @param gson gson instance
1617
*/
17-
void initialize(ExarotonClient client, Gson gson);
18+
void initialize(@NotNull ExarotonClient client, @NotNull Gson gson);
1819
}

src/main/java/com/exaroton/api/ParameterValidator.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -94,7 +94,7 @@ public static <M extends Map<K, V>, K, V> M requireNonEmpty(M map, String name)
9494
}
9595

9696
/**
97-
* Require that a number is not null and positive (> 0)
97+
* Require that a number is not null and positive (&gt; 0)
9898
*
9999
* @param number number to validate
100100
* @param name name of the parameter

src/main/java/com/exaroton/api/billing/pools/CreditPool.java

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -170,12 +170,11 @@ public double getOwnCredits() {
170170
* Set the exaroton client used for further requests
171171
*
172172
* @param client exaroton client
173-
* @return updated pool object
174173
*/
175174
@ApiStatus.Internal
176175
@Override
177-
public void initialize(ExarotonClient client, Gson gson) {
178-
this.client = client;
176+
public void initialize(@NotNull ExarotonClient client, @NotNull Gson gson) {
177+
this.client = Objects.requireNonNull(client);
179178
this.fetched = true;
180179
}
181180

src/main/java/com/exaroton/api/server/PlayerList.java

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -63,6 +63,7 @@ public CompletableFuture<List<String>> getEntries() throws IOException {
6363
* add players to list
6464
*
6565
* @param entries player names
66+
* @return completable future with all players in the list
6667
* @throws IOException Connection errors
6768
*/
6869
public CompletableFuture<List<String>> add(List<String> entries) throws IOException {
@@ -77,6 +78,7 @@ public CompletableFuture<List<String>> add(List<String> entries) throws IOExcept
7778
* remove players from list
7879
*
7980
* @param entries player names
81+
* @return completable future with all players in the list
8082
* @throws IOException Connection errors
8183
*/
8284
public CompletableFuture<List<String>> remove(List<String> entries) throws IOException {

src/main/java/com/exaroton/api/server/Server.java

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -373,6 +373,7 @@ public CompletableFuture<Server> restart() throws IOException {
373373
* Execute a server command. If a websocket connection with the console stream is active the command will be sent via the websocket.
374374
*
375375
* @param command command that will be sent to the console
376+
* @return completable future that completes once the command has been sent
376377
* @throws IOException connection errors
377378
*/
378379
public CompletableFuture<Void> executeCommand(String command) throws IOException {

src/main/java/com/exaroton/api/server/ServerFile.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -152,7 +152,7 @@ public CompletableFuture<Void> putContent(String content) throws IOException {
152152
* @see #upload(InputStream)
153153
* @see #upload(Supplier)
154154
*/
155-
public CompletableFuture<Void> upload(Path path) throws IOException, APIException {
155+
public CompletableFuture<Void> upload(Path path) throws IOException {
156156
return upload(Files.newInputStream(path));
157157
}
158158

src/main/java/com/exaroton/api/server/config/options/BaseSelectOption.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@
88

99
/**
1010
* Base class for select and multi-select options
11-
* @param <T> value type (String or Set<String>)
11+
* @param <T> value type (String or Set&lt;String&gt;)
1212
*/
1313
@ApiStatus.NonExtendable
1414
public class BaseSelectOption<T> extends ConfigOption<T> {

src/main/java/com/exaroton/api/ws/WebSocketClient.java

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -20,6 +20,7 @@ public final class WebSocketClient extends org.java_websocket.client.WebSocketCl
2020
private final WebSocketManager manager;
2121

2222
/**
23+
* @param logger SLF4J logger
2324
* @param uri websocket uri
2425
* @param manager websocket manager
2526
*/

0 commit comments

Comments
 (0)