Class AbstractConfigBuilder<T,B extends AbstractConfigBuilder<T,B,P>,P extends ConfigurationProvider<?>>
- java.lang.Object
-
- cc.carm.lib.configuration.core.builder.AbstractConfigBuilder<T,B,P>
-
- Direct Known Subclasses:
CommonConfigBuilder
public abstract class AbstractConfigBuilder<T,B extends AbstractConfigBuilder<T,B,P>,P extends ConfigurationProvider<?>> extends java.lang.Object
-
-
Field Summary
Fields Modifier and Type Field Description protected T
defaultValue
protected @Nullable java.util.List<java.lang.String>
headerComments
protected @Nullable java.lang.String
inlineComment
protected @Nullable java.lang.String
path
protected P
provider
protected java.lang.Class<? super P>
providerClass
-
Constructor Summary
Constructors Constructor Description AbstractConfigBuilder(java.lang.Class<? super P> providerClass)
-
Method Summary
All Methods Instance Methods Abstract Methods Concrete Methods Modifier and Type Method Description abstract @NotNull ConfigValue<?>
build()
protected @NotNull ValueManifest<T>
buildManifest()
B
comments(@NotNull java.lang.String... comments)
B
defaults(@NotNull java.util.function.Supplier<@Nullable T> defaultValueSupplier)
B
defaults(T defaultValue)
B
from(P provider)
protected abstract B
getThis()
B
headerComments(@NotNull java.lang.String... comments)
B
headerComments(@NotNull java.util.List<java.lang.String> comments)
B
inlineComment(@NotNull java.lang.String comment)
B
path(@Nullable java.lang.String path)
-
-
-
Field Detail
-
providerClass
protected final java.lang.Class<? super P extends ConfigurationProvider<?>> providerClass
-
provider
@Nullable protected P extends ConfigurationProvider<?> provider
-
path
@Nullable protected @Nullable java.lang.String path
-
headerComments
@Nullable protected @Nullable java.util.List<java.lang.String> headerComments
-
inlineComment
@Nullable protected @Nullable java.lang.String inlineComment
-
defaultValue
@Nullable protected T defaultValue
-
-
Constructor Detail
-
AbstractConfigBuilder
public AbstractConfigBuilder(java.lang.Class<? super P> providerClass)
-
-
Method Detail
-
getThis
@NotNull protected abstract B getThis()
-
build
@NotNull public abstract @NotNull ConfigValue<?> build()
-
path
@NotNull public B path(@Nullable @Nullable java.lang.String path)
-
comments
@NotNull public B comments(@NotNull @NotNull java.lang.String... comments)
-
headerComments
@NotNull public B headerComments(@NotNull @NotNull java.lang.String... comments)
-
headerComments
@NotNull public B headerComments(@NotNull @NotNull java.util.List<java.lang.String> comments)
-
inlineComment
@NotNull public B inlineComment(@NotNull @NotNull java.lang.String comment)
-
defaults
@NotNull public B defaults(@NotNull @NotNull java.util.function.Supplier<@Nullable T> defaultValueSupplier)
-
buildManifest
@NotNull protected @NotNull ValueManifest<T> buildManifest()
-
-