Switched Java to 21, fixed JavaDoc warnings.
This commit is contained in:
@@ -24,6 +24,17 @@ import java.time.format.DateTimeParseException;
|
||||
*/
|
||||
public class InstantTypeAdapter implements JsonSerializer<Instant>, JsonDeserializer<Instant> {
|
||||
|
||||
/**
|
||||
* Constructs a new {@code InstantTypeAdapter} instance.
|
||||
* <p>
|
||||
* This is a default, no-argument constructor for the {@link InstantTypeAdapter} class,
|
||||
* which provides custom (de)serialization support for {@link Instant} objects in
|
||||
* accordance with the ISO-8601 standard.
|
||||
*/
|
||||
public InstantTypeAdapter() {
|
||||
// Default constructor
|
||||
}
|
||||
|
||||
/**
|
||||
* Serializes an {@link Instant} object into its ISO-8601 string representation as a {@link JsonElement}.
|
||||
*
|
||||
|
||||
@@ -21,7 +21,6 @@ import java.util.Map;
|
||||
*/
|
||||
@Builder(builderClassName = "ConfigurationBuilder")
|
||||
public class JsonConfiguration {
|
||||
|
||||
/**
|
||||
* The name of the application.
|
||||
* This variable is used to identify the application and is incorporated into various configurations,
|
||||
@@ -67,6 +66,21 @@ public class JsonConfiguration {
|
||||
*/
|
||||
private final Gson gson;
|
||||
|
||||
/**
|
||||
* Constructs a new {@code JsonConfiguration} instance with the specified parameters.
|
||||
*
|
||||
* @param appName the name of the application
|
||||
* @param homeDir the home directory path for the application
|
||||
* @param settings a map containing configuration settings as key-value pairs
|
||||
* @param gson the Gson instance used for JSON serialization and deserialization
|
||||
*/
|
||||
public JsonConfiguration(String appName, String homeDir, Map<String, String> settings, Gson gson) {
|
||||
this.appName = appName;
|
||||
this.homeDir = homeDir;
|
||||
this.settings = settings;
|
||||
this.gson = gson;
|
||||
}
|
||||
|
||||
/**
|
||||
* Stores a key-value pair into the configuration settings.
|
||||
* The value is serialized into a JSON string before being stored.
|
||||
@@ -206,6 +220,18 @@ public class JsonConfiguration {
|
||||
*/
|
||||
private String homeDir = System.getProperty("user.home");
|
||||
|
||||
/**
|
||||
* Default constructor for the {@code JsonConfigurationBuilder} class.
|
||||
* Initializes a new instance of the {@code JsonConfigurationBuilder}.
|
||||
* This constructor allows creation of a builder used for configuring
|
||||
* {@code JsonConfiguration} instances, enabling the specification of
|
||||
* application-specific settings such as the application name, home directory,
|
||||
* and custom Gson adapters.
|
||||
*/
|
||||
public JsonConfigurationBuilder() {
|
||||
// Default constructor
|
||||
}
|
||||
|
||||
/**
|
||||
* Sets the application name to be used in the configuration.
|
||||
*
|
||||
|
||||
Reference in New Issue
Block a user