Fix Javadoc warnings due to Java 21 update (+ some other warnings)
The default implicit constructor must also have a doc comment, so I have to make it explicit and either properly restrict the visibility of the constructor, or actually document it.
This commit is contained in:
parent
decf302851
commit
d411618e63
@ -25,7 +25,6 @@ import java.util.function.Function;
|
||||
*/
|
||||
public class PandalibBungeePermissions implements Listener {
|
||||
|
||||
|
||||
/**
|
||||
* Registers event listener to redirect permission checks to {@code pandalib-permissions}.
|
||||
* @param bungeePlugin a BungeeCord plugin.
|
||||
@ -35,6 +34,8 @@ public class PandalibBungeePermissions implements Listener {
|
||||
}
|
||||
|
||||
|
||||
private PandalibBungeePermissions() {}
|
||||
|
||||
/**
|
||||
* Event handler called when a plugin asks if a player has a permission.
|
||||
* @param event the permission check event.
|
||||
|
@ -43,4 +43,7 @@ public class PandaLibBungee {
|
||||
public static Plugin getPlugin() {
|
||||
return plugin;
|
||||
}
|
||||
|
||||
private PandaLibBungee() {}
|
||||
|
||||
}
|
||||
|
@ -35,4 +35,11 @@ public class BungeeBackupConfig {
|
||||
* A list of ignored files or directory in the workdir to exclude from the backup.
|
||||
*/
|
||||
public List<String> workdirIgnoreList = new ArrayList<>();
|
||||
|
||||
/**
|
||||
* Creates a new {@link BungeeBackupConfig}.
|
||||
*/
|
||||
public BungeeBackupConfig() {
|
||||
|
||||
}
|
||||
}
|
||||
|
@ -22,6 +22,11 @@ public class ChatColorGradient {
|
||||
|
||||
private final List<GradientColor> colors = new ArrayList<>();
|
||||
|
||||
/**
|
||||
* Create the custom gradient.
|
||||
*/
|
||||
public ChatColorGradient() {}
|
||||
|
||||
/**
|
||||
* Put a specific color at a specific location in the gradient.
|
||||
* @param gradientLocation the location in the gradient.
|
||||
|
@ -293,4 +293,7 @@ public class ChatColorUtil {
|
||||
}
|
||||
|
||||
|
||||
|
||||
private ChatColorUtil() {}
|
||||
|
||||
}
|
@ -157,5 +157,9 @@ public class ChatConfig {
|
||||
.thenText("] ");
|
||||
}
|
||||
|
||||
private PandaTheme() {}
|
||||
|
||||
}
|
||||
|
||||
private ChatConfig() {}
|
||||
}
|
||||
|
@ -679,5 +679,10 @@ public abstract class ChatStatic {
|
||||
return builder.style(c.style()).append(c.children());
|
||||
}
|
||||
|
||||
/**
|
||||
* Creates a new {@link ChatStatic} instance.
|
||||
*/
|
||||
protected ChatStatic() {}
|
||||
|
||||
|
||||
}
|
||||
|
@ -657,5 +657,6 @@ public class ChatUtil {
|
||||
return str;
|
||||
}
|
||||
|
||||
private ChatUtil() {}
|
||||
|
||||
}
|
||||
|
@ -25,6 +25,9 @@ public class CLIBrigadierDispatcher extends BrigadierDispatcher<CLICommandSender
|
||||
public static final CLICommandSender CLI_CONSOLE_COMMAND_SENDER = new CLIConsoleCommandSender();
|
||||
|
||||
|
||||
private CLIBrigadierDispatcher() {}
|
||||
|
||||
|
||||
/**
|
||||
* Executes the provided command as the console.
|
||||
* @param commandWithoutSlash the command, without the eventual slash at the beginning.
|
||||
|
@ -11,6 +11,12 @@ import org.jetbrains.annotations.NotNull;
|
||||
* The console command sender.
|
||||
*/
|
||||
public class CLIConsoleCommandSender implements CLICommandSender {
|
||||
|
||||
/**
|
||||
* Creates a new console command sender.
|
||||
*/
|
||||
protected CLIConsoleCommandSender() {}
|
||||
|
||||
public String getName() {
|
||||
return "Console";
|
||||
}
|
||||
|
@ -36,6 +36,11 @@ import static fr.pandacube.lib.chat.ChatStatic.text;
|
||||
*/
|
||||
public class CommandAdmin extends CLIBrigadierCommand {
|
||||
|
||||
/**
|
||||
* Initializes the admin command.
|
||||
*/
|
||||
public CommandAdmin() {}
|
||||
|
||||
@Override
|
||||
protected LiteralArgumentBuilder<CLICommandSender> buildCommand() {
|
||||
return literal("admin")
|
||||
|
@ -9,6 +9,11 @@ import fr.pandacube.lib.cli.CLIApplication;
|
||||
*/
|
||||
public class CommandStop extends CLIBrigadierCommand {
|
||||
|
||||
/**
|
||||
* Initializes the admin command.
|
||||
*/
|
||||
public CommandStop() {}
|
||||
|
||||
@Override
|
||||
protected LiteralArgumentBuilder<CLICommandSender> buildCommand() {
|
||||
return literal("stop")
|
||||
|
@ -97,5 +97,7 @@ public class CLILogger {
|
||||
t.start();
|
||||
return ps;
|
||||
}
|
||||
|
||||
private CLILogger() {}
|
||||
|
||||
}
|
||||
|
@ -25,6 +25,11 @@ import java.util.function.Predicate;
|
||||
*/
|
||||
public abstract class BrigadierCommand<S> {
|
||||
|
||||
/**
|
||||
* Creates a Brigadier command.
|
||||
*/
|
||||
public BrigadierCommand() {}
|
||||
|
||||
|
||||
/**
|
||||
* Returns a builder for this command.
|
||||
|
@ -21,6 +21,11 @@ public abstract class BrigadierDispatcher<S> {
|
||||
|
||||
private final CommandDispatcher<S> dispatcher = new CommandDispatcher<>();
|
||||
|
||||
/**
|
||||
* Creates a new Dispatcher instance.
|
||||
*/
|
||||
public BrigadierDispatcher() {}
|
||||
|
||||
|
||||
/**
|
||||
* Registers the provided command node into this dispatcher.
|
||||
|
@ -140,4 +140,8 @@ public class BrigadierSuggestionsUtil {
|
||||
}
|
||||
|
||||
|
||||
|
||||
private BrigadierSuggestionsUtil() {}
|
||||
|
||||
|
||||
}
|
||||
|
@ -70,6 +70,11 @@ public abstract class BackupCleaner implements UnaryOperator<TreeSet<LocalDateTi
|
||||
};
|
||||
}
|
||||
|
||||
/**
|
||||
* Create a backup cleaner.
|
||||
*/
|
||||
public BackupCleaner() {}
|
||||
|
||||
|
||||
/**
|
||||
* Creates a new {@link BackupCleaner} that keeps the archives kept by this {@link BackupCleaner} or by the provided
|
||||
|
@ -54,7 +54,7 @@ public class CronScheduler {
|
||||
long now = System.currentTimeMillis();
|
||||
|
||||
if (!tasks.isEmpty()) {
|
||||
CronTask next = tasks.get(0);
|
||||
CronTask next = tasks.getFirst();
|
||||
if (next.nextRun <= now) {
|
||||
next.runAsync();
|
||||
setLastRun(next.taskId, now);
|
||||
@ -224,5 +224,6 @@ public class CronScheduler {
|
||||
.toEpochMilli();
|
||||
}
|
||||
|
||||
private CronScheduler() {}
|
||||
|
||||
}
|
||||
|
@ -163,4 +163,6 @@ public class Json {
|
||||
}
|
||||
}*/
|
||||
|
||||
private Json() {}
|
||||
|
||||
}
|
||||
|
@ -30,6 +30,8 @@ public class ThrowableAdapter implements JsonSerializer<Throwable>, JsonDeserial
|
||||
|
||||
/* package */ static final TypeAdapterFactory FACTORY = TreeTypeAdapter.newTypeHierarchyFactory(Throwable.class, new ThrowableAdapter());
|
||||
|
||||
private ThrowableAdapter() {}
|
||||
|
||||
|
||||
@Override
|
||||
public Throwable deserialize(JsonElement json, Type typeOfT, JsonDeserializationContext context) throws JsonParseException {
|
||||
|
@ -237,5 +237,8 @@ public class TypeConverter {
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
|
||||
private TypeConverter() {}
|
||||
|
||||
}
|
||||
|
@ -58,6 +58,9 @@ public record MinecraftVersionList(
|
||||
|
||||
private static final TypeToken<Map<String, Integer>> MAP_STR_INT_TYPE = new TypeToken<>() { };
|
||||
private static final TypeToken<Map<Integer, List<String>>> MAP_INT_LIST_STRING_TYPE = new TypeToken<>() { };
|
||||
|
||||
private MinecraftVersionListAdapter() {}
|
||||
|
||||
@Override
|
||||
public MinecraftVersionList deserialize(JsonElement json, Type typeOfT, JsonDeserializationContext context) throws JsonParseException {
|
||||
if (!(json instanceof JsonObject jsonObj))
|
||||
|
@ -135,4 +135,7 @@ public class MinecraftVersionUtil {
|
||||
return set;
|
||||
}
|
||||
|
||||
|
||||
private MinecraftVersionUtil() {}
|
||||
|
||||
}
|
||||
|
@ -56,18 +56,21 @@
|
||||
<artifact>org.apache.commons:commons-dbcp2</artifact>
|
||||
<excludes>
|
||||
<exclude>META-INF/MANIFEST.MF</exclude>
|
||||
<exclude>META-INF/versions/9/**</exclude>
|
||||
</excludes>
|
||||
</filter>
|
||||
<filter>
|
||||
<artifact>org.apache.commons:commons-pool2</artifact>
|
||||
<excludes>
|
||||
<exclude>META-INF/MANIFEST.MF</exclude>
|
||||
<exclude>META-INF/versions/9/**</exclude>
|
||||
</excludes>
|
||||
</filter>
|
||||
<filter>
|
||||
<artifact>commons-logging:commons-logging</artifact>
|
||||
<excludes>
|
||||
<exclude>META-INF/MANIFEST.MF</exclude>
|
||||
<exclude>META-INF/versions/9/**</exclude>
|
||||
</excludes>
|
||||
</filter>
|
||||
</filters>
|
||||
|
@ -16,6 +16,11 @@ import java.util.stream.Collectors;
|
||||
*/
|
||||
public class SQLElementList<E extends SQLElement<E>> extends ArrayList<E> {
|
||||
|
||||
/**
|
||||
* Creates an empty list of sql elements.
|
||||
*/
|
||||
public SQLElementList() {}
|
||||
|
||||
/**
|
||||
* Stores all the values modified by {@link #setCommon(SQLField, Object)}.
|
||||
*/
|
||||
|
@ -232,12 +232,8 @@ public class SQLField<E extends SQLElement<E>, T> {
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
@SuppressWarnings({"rawtypes", "unchecked"})
|
||||
public Object fromJavaTypeToJDBCType(Object value) throws DBException {
|
||||
/* package */ Object fromJavaTypeToJDBCType(Object value) throws DBException {
|
||||
Object ret = value;
|
||||
if (value != null && type instanceof SQLCustomType customType) {
|
||||
try {
|
||||
@ -250,7 +246,7 @@ public class SQLField<E extends SQLElement<E>, T> {
|
||||
return ret;
|
||||
}
|
||||
|
||||
public Collection<Object> fromListJavaTypeToJDBCType(Collection<?> values) throws DBException {
|
||||
/* package */ Collection<Object> fromListJavaTypeToJDBCType(Collection<?> values) throws DBException {
|
||||
if (values == null)
|
||||
return null;
|
||||
List<Object> ret = new ArrayList<>(values.size());
|
||||
|
@ -13,6 +13,11 @@ import fr.pandacube.lib.util.log.Log;
|
||||
*/
|
||||
public abstract class SQLWhere<E extends SQLElement<E>> {
|
||||
|
||||
/**
|
||||
* Creates a SQL WHERE expression.
|
||||
*/
|
||||
protected SQLWhere() {}
|
||||
|
||||
/* package */ abstract ParameterizedSQLString toSQL() throws DBException;
|
||||
|
||||
@Override
|
||||
@ -69,6 +74,7 @@ public abstract class SQLWhere<E extends SQLElement<E>> {
|
||||
* Create a custom SQL {@code WHERE} expression.
|
||||
* @param whereExpr the raw SQL {@code WHERE} expression.
|
||||
* @return a new SQL {@code WHERE} expression.
|
||||
* @param <E> the table type.
|
||||
*/
|
||||
public static <E extends SQLElement<E>> SQLWhere<E> expression(String whereExpr) {
|
||||
return expression(whereExpr, List.of());
|
||||
@ -79,6 +85,7 @@ public abstract class SQLWhere<E extends SQLElement<E>> {
|
||||
* @param whereExpr the raw SQL {@code WHERE} expression.
|
||||
* @param params the parameters of the provided expression.
|
||||
* @return a new SQL {@code WHERE} expression.
|
||||
* @param <E> the table type.
|
||||
*/
|
||||
public static <E extends SQLElement<E>> SQLWhere<E> expression(String whereExpr, List<Object> params) {
|
||||
return new SQLWhereCustomExpression<>(whereExpr, params);
|
||||
@ -89,6 +96,7 @@ public abstract class SQLWhere<E extends SQLElement<E>> {
|
||||
* @param leftExpr the raw SQL left operand.
|
||||
* @param valuesIn the values on the right of the {@code IN} operator.
|
||||
* @return a new SQL {@code WHERE} expression.
|
||||
* @param <E> the table type.
|
||||
*/
|
||||
public static <E extends SQLElement<E>> SQLWhere<E> expressionIn(String leftExpr, Collection<?> valuesIn) {
|
||||
return expressionIn(leftExpr, List.of(), valuesIn);
|
||||
@ -100,6 +108,7 @@ public abstract class SQLWhere<E extends SQLElement<E>> {
|
||||
* @param leftParams the parameters of the left operand.
|
||||
* @param valuesIn the values on the right of the {@code IN} operator.
|
||||
* @return a new SQL {@code WHERE} expression.
|
||||
* @param <E> the table type.
|
||||
*/
|
||||
public static <E extends SQLElement<E>> SQLWhere<E> expressionIn(String leftExpr, List<Object> leftParams, Collection<?> valuesIn) {
|
||||
return new SQLWhereInCustom<>(leftExpr, leftParams, valuesIn);
|
||||
|
@ -21,4 +21,8 @@
|
||||
</dependency>
|
||||
</dependencies>
|
||||
|
||||
<properties>
|
||||
<maven.javadoc.skip>true</maven.javadoc.skip>
|
||||
</properties>
|
||||
|
||||
</project>
|
@ -82,6 +82,12 @@ public class PandalibPaperPermissions implements Listener {
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* Creates a {@link PandalibPaperPermissions} instance.
|
||||
*/
|
||||
private PandalibPaperPermissions() {}
|
||||
|
||||
/**
|
||||
* Player login event handler.
|
||||
* @param event the event.
|
||||
|
@ -119,5 +119,7 @@ public class PermissionExpressionParser {
|
||||
return super.evaluate(constant, evaluationContext);
|
||||
}
|
||||
}
|
||||
|
||||
private PermissionExpressionParser() {}
|
||||
|
||||
}
|
||||
|
@ -199,5 +199,7 @@ public class Permissions {
|
||||
checkInitialized();
|
||||
return backendReader.getFullPermissionsList();
|
||||
}
|
||||
|
||||
private Permissions() {}
|
||||
|
||||
}
|
@ -48,4 +48,5 @@ public class Reflect {
|
||||
}
|
||||
|
||||
|
||||
private Reflect() {}
|
||||
}
|
||||
|
@ -78,4 +78,7 @@ public class WrapperRegistry {
|
||||
ReflectConstructor<? extends ReflectWrapperI> objectWrapperConstructor) {
|
||||
}
|
||||
|
||||
|
||||
private WrapperRegistry() {}
|
||||
|
||||
}
|
||||
|
@ -104,4 +104,7 @@ public class DistanceUtil {
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
private DistanceUtil() {}
|
||||
|
||||
}
|
||||
|
@ -84,4 +84,6 @@ public class EnumUtil {
|
||||
return RandomUtil.arrayElement(enumType.getEnumConstants());
|
||||
}
|
||||
|
||||
private EnumUtil() {}
|
||||
|
||||
}
|
||||
|
@ -52,4 +52,7 @@ public class FileUtils {
|
||||
Files.copy(source.toPath(), target.toPath());
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
private FileUtils() {}
|
||||
}
|
||||
|
@ -21,4 +21,8 @@ public class ListUtil {
|
||||
list.add(i);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
private ListUtil() {}
|
||||
|
||||
}
|
||||
|
@ -158,5 +158,7 @@ public class MemoryUtil {
|
||||
unitMultiplier = uMultiplier;
|
||||
}
|
||||
}
|
||||
|
||||
private MemoryUtil() {}
|
||||
|
||||
}
|
||||
|
@ -97,6 +97,8 @@ public class MinecraftWebUtil {
|
||||
return builder.toString();
|
||||
|
||||
}
|
||||
|
||||
private MinecraftWebUtil() {}
|
||||
|
||||
|
||||
|
||||
|
@ -10,7 +10,7 @@ import java.util.UUID;
|
||||
* <p>
|
||||
* You can generate the UUID programmatically using {@link #getFromNickName(String)} and
|
||||
* {@link #getFromNickNames(String[])}.
|
||||
*
|
||||
* <p>
|
||||
* To use this class as a program, type
|
||||
* <pre>
|
||||
* java -cp<anyClassPathContainingThisClass> fr.pandacube.lib.util.OfflineUUID [playernames...]
|
||||
@ -67,4 +67,6 @@ public class OfflineUUID {
|
||||
System.out.println(arg + "\t" + getFromNickName(arg));
|
||||
}
|
||||
}
|
||||
|
||||
private OfflineUUID() {}
|
||||
}
|
||||
|
@ -172,7 +172,7 @@ public class RandomUtil {
|
||||
return String.valueOf(pw);
|
||||
}
|
||||
|
||||
|
||||
private RandomUtil() {}
|
||||
|
||||
|
||||
}
|
||||
|
@ -146,6 +146,6 @@ public class StringUtil {
|
||||
|
||||
|
||||
|
||||
|
||||
private StringUtil() {}
|
||||
|
||||
}
|
||||
|
@ -147,5 +147,6 @@ public class ThrowableUtil {
|
||||
return new RuntimeException(t);
|
||||
}
|
||||
|
||||
private ThrowableUtil() {}
|
||||
|
||||
}
|
||||
|
@ -56,4 +56,6 @@ public class Tick {
|
||||
return Duration.ofMillis(toMs(tick));
|
||||
}
|
||||
|
||||
private Tick() {}
|
||||
|
||||
}
|
||||
|
@ -481,4 +481,7 @@ public class TimeUtil {
|
||||
}
|
||||
|
||||
|
||||
private TimeUtil() {}
|
||||
|
||||
|
||||
}
|
||||
|
@ -2,6 +2,9 @@ package fr.pandacube.lib.util.function;
|
||||
|
||||
/**
|
||||
* A consumer that can possibly throw a checked exception.
|
||||
* @param <T> the first parameter for this bi-consumer.
|
||||
* @param <U> the second parameter for this bi-consumer.
|
||||
* @param <E> the exception type that this interface method can throw.
|
||||
*/
|
||||
@FunctionalInterface
|
||||
public interface BiConsumerException<T, U, E extends Exception> {
|
||||
|
@ -2,6 +2,8 @@ package fr.pandacube.lib.util.function;
|
||||
|
||||
/**
|
||||
* A predicate that can possibly throw a checked exception.
|
||||
* @param <T> the parameter for this predicate.
|
||||
* @param <E> the exception type that this predicate can throw.
|
||||
*/
|
||||
@FunctionalInterface
|
||||
public interface PredicateException<T, E extends Exception> {
|
||||
|
@ -2,6 +2,7 @@ package fr.pandacube.lib.util.function;
|
||||
|
||||
/**
|
||||
* A runnable that can possibly throw a checked exception.
|
||||
* @param <E> the exception type that this interface method can throw.
|
||||
*/
|
||||
@FunctionalInterface
|
||||
public interface RunnableException<E extends Exception> {
|
||||
|
@ -2,6 +2,8 @@ package fr.pandacube.lib.util.function;
|
||||
|
||||
/**
|
||||
* A supplier that can possibly throw a checked exception.
|
||||
* @param <T> the return type of this supplier.
|
||||
* @param <E> the exception type that this interface method can throw.
|
||||
*/
|
||||
@FunctionalInterface
|
||||
public interface SupplierException<T, E extends Exception> {
|
||||
|
@ -2,6 +2,9 @@ package fr.pandacube.lib.util.function;
|
||||
|
||||
/**
|
||||
* A function that can possibly throw a checked exception.
|
||||
* @param <T> the first parameter for this bi-function.
|
||||
* @param <U> the second parameter for this bi-function.
|
||||
* @param <E> the exception type that this interface method can throw.
|
||||
*/
|
||||
@FunctionalInterface
|
||||
public interface ToIntBiFunctionException<T, U, E extends Exception> {
|
||||
|
@ -2,6 +2,10 @@ package fr.pandacube.lib.util.function;
|
||||
|
||||
/**
|
||||
* A consumer that can possibly throw a checked exception.
|
||||
* @param <T> the first parameter for this tri-consumer.
|
||||
* @param <U> the second parameter for this tri-consumer.
|
||||
* @param <V> the third parameter for this tri-consumer.
|
||||
* @param <E> the exception type that this interface method can throw.
|
||||
*/
|
||||
@FunctionalInterface
|
||||
public interface TriConsumerException<T, U, V, E extends Exception> {
|
||||
|
@ -30,6 +30,11 @@ public class DailyLogRotateFileHandler extends Handler {
|
||||
private String currentFileDate = getCurrentDay();
|
||||
private boolean closed = false;
|
||||
|
||||
/**
|
||||
* Creates a new {@link DailyLogRotateFileHandler}.
|
||||
*/
|
||||
public DailyLogRotateFileHandler() {}
|
||||
|
||||
|
||||
@Override
|
||||
public synchronized void close() throws SecurityException {
|
||||
|
@ -159,4 +159,6 @@ public final class Log {
|
||||
logger.info(message);
|
||||
}
|
||||
|
||||
private Log() {}
|
||||
|
||||
}
|
||||
|
@ -14,6 +14,11 @@ import java.time.Duration;
|
||||
public abstract class AbstractServerWS extends WebSocketAdapter implements AbstractWS {
|
||||
|
||||
private boolean isClosed = false;
|
||||
|
||||
/**
|
||||
* Creates a Websocket server endpoint.
|
||||
*/
|
||||
public AbstractServerWS() {}
|
||||
|
||||
@Override
|
||||
public final void onWebSocketConnect(Session session)
|
||||
|
@ -100,4 +100,6 @@ public class PayloadRegistry {
|
||||
registerPayloadType("login-succeed", LoginSucceedPayload.class);
|
||||
}
|
||||
|
||||
private PayloadRegistry() {}
|
||||
|
||||
}
|
||||
|
@ -4,4 +4,9 @@ package fr.pandacube.lib.ws.payloads;
|
||||
* Payload used by the server in inform the client the login was successful.
|
||||
*/
|
||||
public class LoginSucceedPayload extends Payload {
|
||||
|
||||
/**
|
||||
* Creates a new {@link LoginSucceedPayload}.
|
||||
*/
|
||||
public LoginSucceedPayload() {}
|
||||
}
|
||||
|
@ -5,4 +5,8 @@ package fr.pandacube.lib.ws.payloads;
|
||||
*/
|
||||
public abstract class Payload {
|
||||
|
||||
/**
|
||||
* Creates a new {@link Payload}.
|
||||
*/
|
||||
public Payload() {}
|
||||
}
|
Loading…
Reference in New Issue
Block a user