docs: Add docs to new config classes
This commit is contained in:
parent
d1370bfb8c
commit
3b384dbe6d
|
@ -8,6 +8,9 @@ import org.jetbrains.annotations.Nullable;
|
||||||
|
|
||||||
import java.util.logging.Logger;
|
import java.util.logging.Logger;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Configuration handle for a single configuration section.
|
||||||
|
*/
|
||||||
public class ConfigurationSectionHandle extends GenericConfigHandle<ConfigurationSection> {
|
public class ConfigurationSectionHandle extends GenericConfigHandle<ConfigurationSection> {
|
||||||
public static Builder<? extends Builder> builder(@NotNull ConfigurationSection configurationSection) {
|
public static Builder<? extends Builder> builder(@NotNull ConfigurationSection configurationSection) {
|
||||||
return new Builder<>(configurationSection);
|
return new Builder<>(configurationSection);
|
||||||
|
@ -21,6 +24,11 @@ public class ConfigurationSectionHandle extends GenericConfigHandle<Configuratio
|
||||||
this.config = configurationSection;
|
this.config = configurationSection;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Builder for {@link ConfigurationSectionHandle}.
|
||||||
|
*
|
||||||
|
* @param <B> The builder type.
|
||||||
|
*/
|
||||||
public static class Builder<B extends Builder<B>> extends GenericConfigHandle.Builder<ConfigurationSection, B> {
|
public static class Builder<B extends Builder<B>> extends GenericConfigHandle.Builder<ConfigurationSection, B> {
|
||||||
private final ConfigurationSection configurationSection;
|
private final ConfigurationSection configurationSection;
|
||||||
|
|
||||||
|
@ -28,6 +36,9 @@ public class ConfigurationSectionHandle extends GenericConfigHandle<Configuratio
|
||||||
this.configurationSection = configurationSection;
|
this.configurationSection = configurationSection;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* {@inheritDoc}
|
||||||
|
*/
|
||||||
@Override
|
@Override
|
||||||
public @NotNull ConfigurationSectionHandle build() {
|
public @NotNull ConfigurationSectionHandle build() {
|
||||||
return new ConfigurationSectionHandle(configurationSection, logger, nodes, migrator);
|
return new ConfigurationSectionHandle(configurationSection, logger, nodes, migrator);
|
||||||
|
|
|
@ -99,7 +99,7 @@ abstract class FileConfigHandle<C extends FileConfiguration> extends GenericConf
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Builder for {@link FileConfigHandle}.
|
* Abstract builder for {@link FileConfigHandle}.
|
||||||
*
|
*
|
||||||
* @param <C> The configuration type.
|
* @param <C> The configuration type.
|
||||||
* @param <B> The builder type.
|
* @param <B> The builder type.
|
||||||
|
|
|
@ -12,6 +12,9 @@ import org.jetbrains.annotations.Nullable;
|
||||||
|
|
||||||
import java.util.logging.Logger;
|
import java.util.logging.Logger;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Generic configuration handle for all ConfigurationSection types.
|
||||||
|
*/
|
||||||
public abstract class GenericConfigHandle<C extends ConfigurationSection> {
|
public abstract class GenericConfigHandle<C extends ConfigurationSection> {
|
||||||
protected final @Nullable Logger logger;
|
protected final @Nullable Logger logger;
|
||||||
protected final @Nullable NodeGroup nodes;
|
protected final @Nullable NodeGroup nodes;
|
||||||
|
@ -121,7 +124,7 @@ public abstract class GenericConfigHandle<C extends ConfigurationSection> {
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Builder for {@link FileConfigHandle}.
|
* Abstract builder for {@link GenericConfigHandle}.
|
||||||
*
|
*
|
||||||
* @param <C> The configuration type.
|
* @param <C> The configuration type.
|
||||||
* @param <B> The builder type.
|
* @param <B> The builder type.
|
||||||
|
|
Loading…
Reference in New Issue