Added some package-info files for javadocs

This commit is contained in:
Risto Lahtela 2021-03-10 11:38:48 +02:00
parent 3daf54edc8
commit bdcd84749b
46 changed files with 189 additions and 10 deletions

View File

@ -0,0 +1,4 @@
/**
* {@link com.djrapitops.plan.capability.CapabilityService} for figuring out what Plan API methods and classes are available at runtime.
*/
package com.djrapitops.plan.capability;

View File

@ -0,0 +1,6 @@
/**
* PageExtension API for extending the webserver and the website.
*
* <a href="https://github.com/plan-player-analytics/Plan/wiki/APIv5-PageExtension-API">Documentation</a>
*/
package com.djrapitops.plan.delivery.web;

View File

@ -88,8 +88,9 @@ public final class CompositeResolver implements Resolver {
void add(String prefix, Function<Request, Response> resolver, Predicate<Request> accessCheck) {
if (prefix == null) throw new IllegalArgumentException("Prefix can not be null");
if (resolver == null)
if (resolver == null) {
throw new IllegalArgumentException("Function<Request, Response> resolver can not be null");
}
if (accessCheck == null) throw new IllegalArgumentException("Predicate<Request> accessCheck can not be null");
prefixes.add(prefix);
resolvers.add(request -> Optional.ofNullable(resolver.apply(request)));
@ -132,8 +133,9 @@ public final class CompositeResolver implements Resolver {
/**
* Add a new resolver to the CompositeResolver by using functional interfaces
*
* @param prefix Start of the target (first part of the target string, eg "example" in "/example/target/", or "" in "/")
* @param resolver Resolver to call for this target, {@link URIPath#omitFirst()} will be called for Resolver method calls.
* @param prefix Start of the target (first part of the target string, eg "example" in "/example/target/", or "" in "/")
* @param resolver Resolver to call for this target, {@link URIPath#omitFirst()} will be called for Resolver method calls.
* @param accessCheck Function for checking if request should be allowed (true, default) or forbidden (false).
* @return this builder.
*/
public Builder add(String prefix, Function<Request, Response> resolver, Predicate<Request> accessCheck) {

View File

@ -0,0 +1,6 @@
/**
* Classes for implementing functionality with {@link com.djrapitops.plan.delivery.web.ResolverService}.
*
* <a href="https://github.com/plan-player-analytics/Plan/wiki/APIv5-PageExtension-API#resolverservice">Documentation</a>
*/
package com.djrapitops.plan.delivery.web.resolver;

View File

@ -0,0 +1,4 @@
/**
* Classes for {@link com.djrapitops.plan.delivery.web.ResolverService} {@link com.djrapitops.plan.delivery.web.resolver.request.Request}s.
*/
package com.djrapitops.plan.delivery.web.resolver.request;

View File

@ -0,0 +1,6 @@
/**
* Classes for implementing functionality with {@link com.djrapitops.plan.delivery.web.ResourceService}.
*
* <a href="https://github.com/plan-player-analytics/Plan/wiki/APIv5-PageExtension-API#resourceservice">Documentation</a>
*/
package com.djrapitops.plan.delivery.web.resource;

View File

@ -0,0 +1,4 @@
/**
* DataExtension API Annotations.
*/
package com.djrapitops.plan.extension.annotation;

View File

@ -0,0 +1,4 @@
/**
* DataExtension API annotation parsing and validation.
*/
package com.djrapitops.plan.extension.extractor;

View File

@ -0,0 +1,4 @@
/**
* DataExtension API, icon related classes.
*/
package com.djrapitops.plan.extension.icon;

View File

@ -0,0 +1,6 @@
/**
* DataExtension API and related classes.
*
* <a href="https://github.com/plan-player-analytics/Plan/wiki/APIv5---DataExtension-API">Documentation</a>
*/
package com.djrapitops.plan.extension;

View File

@ -0,0 +1,4 @@
/**
* DataExtension API, Table creation.
*/
package com.djrapitops.plan.extension.table;

View File

@ -0,0 +1,6 @@
/**
* Query API related classes.
*
* <a href="https://github.com/plan-player-analytics/Plan/wiki/APIv5-Query-API">Documentation</a>
*/
package com.djrapitops.plan.query;

View File

@ -0,0 +1,4 @@
/**
* {@link com.djrapitops.plan.settings.SettingsService} for providing configuration options to users.
*/
package com.djrapitops.plan.settings;

View File

@ -161,6 +161,7 @@ public final class Reflection {
* Retrieve a class in the net.minecraft.server.VERSION.* package.
*
* @param name - the name of the class, excluding the package.
* @return The found class.
* @throws IllegalArgumentException If the class doesn't exist.
*/
public static Class<?> getMinecraftClass(String name) {
@ -171,6 +172,7 @@ public final class Reflection {
* Retrieve a class in the org.bukkit.craftbukkit.VERSION.* package.
*
* @param name - the name of the class, excluding the package.
* @return The found class
* @throws IllegalArgumentException If the class doesn't exist.
*/
public static Class<?> getCraftBukkitClass(String name) {

View File

@ -0,0 +1,4 @@
/**
* Deprecated API package.
*/
package com.djrapitops.plan.api;

View File

@ -0,0 +1,4 @@
/**
* Plan command implementation.
*/
package com.djrapitops.plan.commands;

View File

@ -0,0 +1,4 @@
/**
* Deprecated API package.
*/
package com.djrapitops.plan.data.element;

View File

@ -0,0 +1,4 @@
/**
* Deprecated API package.
*/
package com.djrapitops.plan.data;

View File

@ -0,0 +1,4 @@
/**
* Deprecated API package.
*/
package com.djrapitops.plan.data.plugin;

View File

@ -0,0 +1,4 @@
/**
* Deprecated API package.
*/
package com.djrapitops.plan.data.store.containers;

View File

@ -186,8 +186,10 @@ public class PlayersMutator {
/**
* Compares players in the mutator to other players in terms of player retention.
*
* @param compareTo Players to compare to.
* @param dateLimit Epoch ms back limit, if the player registered after this their value is not used.
* @param compareTo Players to compare to.
* @param dateLimit Epoch ms back limit, if the player registered after this their value is not used.
* @param onlineResolver Thing that figures out how many players were online at different dates.
* @param activityMsThreshold Threshold for activity index calculation.
* @return Mutator containing the players that are considered to be retained.
* @throws IllegalStateException If all players are rejected due to dateLimit.
*/

View File

@ -0,0 +1,4 @@
/**
* Data types for Output functionality.
*/
package com.djrapitops.plan.delivery.domain;

View File

@ -107,7 +107,7 @@ public class NetworkPageExporter extends FileExporter {
/**
* Perform export for a network page json payload.
*
* @param exportPaths
* @param exportPaths Replacement store for player file paths.
* @param toDirectory Path to Export directory
* @param server Server to export as Network page, {@link Server#isProxy()} assumed true.
* @throws IOException If a template can not be read from jar/disk or the result written

View File

@ -0,0 +1,4 @@
/**
* Output of html and json files to disk.
*/
package com.djrapitops.plan.delivery.export;

View File

@ -0,0 +1,4 @@
/**
* Data formatting related utilities.
*/
package com.djrapitops.plan.delivery.formatting;

View File

@ -0,0 +1,4 @@
/**
* Output features of the plugin.
*/
package com.djrapitops.plan.delivery;

View File

@ -0,0 +1,4 @@
/**
* Utilities for rendering html snippets.
*/
package com.djrapitops.plan.delivery.rendering.html;

View File

@ -0,0 +1,4 @@
/**
* Utilities for rendering json suitable for Javascript libraries.
*/
package com.djrapitops.plan.delivery.rendering.json.graphs;

View File

@ -0,0 +1,4 @@
/**
* Utilities for rendering json Strings.
*/
package com.djrapitops.plan.delivery.rendering.json;

View File

@ -0,0 +1,4 @@
/**
* Mapping and rendering of data to String so that it can be transmitted.
*/
package com.djrapitops.plan.delivery.rendering;

View File

@ -0,0 +1,6 @@
/**
* Utilities for rendering complete html files as String.
*
* @see com.djrapitops.plan.delivery.rendering.pages.PageFactory
*/
package com.djrapitops.plan.delivery.rendering.pages;

View File

@ -0,0 +1,4 @@
/**
* Webserver implementation and HTTP output.
*/
package com.djrapitops.plan.delivery.webserver;

View File

@ -0,0 +1,4 @@
/**
* Input related functionality of the plugin.
*/
package com.djrapitops.plan.gathering;

View File

@ -0,0 +1,4 @@
/**
* Identification of servers and players.
*/
package com.djrapitops.plan.identification;

View File

@ -31,7 +31,7 @@ public interface ServerLoader {
/**
* Load the server information.
*
* @param serverUUID
* @param serverUUID UUID of the server, null if not known
* @return Optional of the saved information or empty if it has not been stored.
* @throws com.djrapitops.plan.exceptions.EnableException When the loading fails
*/

View File

@ -0,0 +1,4 @@
/**
* Dagger Modules for binding interfaces and classes to the dependency graph.
*/
package com.djrapitops.plan.modules;

View File

@ -0,0 +1,4 @@
/**
* PlaceholderAPI placeholder implementation.
*/
package com.djrapitops.plan.placeholder;

View File

@ -0,0 +1,4 @@
/**
* Service for async execution of code.
*/
package com.djrapitops.plan.processing;

View File

@ -0,0 +1,8 @@
/**
* Functionality related to user customization of features in the plugin via configuration files.
*
* @see com.djrapitops.plan.settings.config.PlanConfig
* @see com.djrapitops.plan.settings.locale.Locale
* @see com.djrapitops.plan.settings.theme.ThemeConfig
*/
package com.djrapitops.plan.settings;

View File

@ -0,0 +1,4 @@
/**
* Database implementations, SQL queries and transactions.
*/
package com.djrapitops.plan.storage.database;

View File

@ -54,7 +54,8 @@ public class QueryTablePlayersQuery implements Query<List<TablePlayer>> {
* Create a new query.
*
* @param playerUUIDs UUIDs of the players in the query
* @param beforeDate Date used for Activity Index calculation
* @param beforeDate View data before this epoch ms
* @param afterDate View data after this epoch ms
* @param activeMsThreshold Playtime threshold for Activity Index calculation
*/
public QueryTablePlayersQuery(Collection<UUID> playerUUIDs, long afterDate, long beforeDate, long activeMsThreshold) {

View File

@ -65,7 +65,10 @@ public interface Resource {
String asString() throws IOException;
/**
* @throws UncheckedIOException if fails to read the file
* Map to a WebResource used by {@link com.djrapitops.plan.delivery.web.ResourceService} APIs.
*
* @return The resource
* @throws UncheckedIOException if fails to read the file.
*/
default WebResource asWebResource() {
try {

View File

@ -0,0 +1,4 @@
/**
* File and jar resource management.
*/
package com.djrapitops.plan.storage.file;

View File

@ -0,0 +1,4 @@
/**
* Information permanence and upkeep.
*/
package com.djrapitops.plan.storage;

View File

@ -37,9 +37,10 @@ public class Median<T extends Number & Comparable<? super T>> {
}
/**
* Creates a Median instance
* Creates a Median instance.
*
* @param list the input list
* @param <T> Type of the number calculating median for
* @return an instance of {@code Median} for the List given
*/
public static <T extends Number & Comparable<? super T>> Median<T> forList(List<T> list) {

View File

@ -0,0 +1,4 @@
/**
* Update checking and notifications.
*/
package com.djrapitops.plan.version;