Class SourceValueBuilder<S,V>
- java.lang.Object
-
- cc.carm.lib.configuration.core.builder.AbstractConfigBuilder<T,B,ConfigurationProvider<?>>
-
- cc.carm.lib.configuration.core.builder.CommonConfigBuilder<V,SourceValueBuilder<S,V>>
-
- cc.carm.lib.configuration.core.builder.value.SourceValueBuilder<S,V>
-
public class SourceValueBuilder<S,V> extends CommonConfigBuilder<V,SourceValueBuilder<S,V>>
-
-
Field Summary
Fields Modifier and Type Field Description protected @NotNull java.lang.Class<S>
sourceClass
protected @NotNull ConfigDataFunction<java.lang.Object,S>
sourceParser
protected @NotNull ConfigDataFunction<S,java.lang.Object>
sourceSerializer
protected @NotNull java.lang.Class<V>
valueClass
protected @NotNull ConfigValueParser<S,V>
valueParser
protected @NotNull ConfigDataFunction<V,S>
valueSerializer
-
Fields inherited from class cc.carm.lib.configuration.core.builder.AbstractConfigBuilder
defaultValue, headerComments, inlineComment, path, provider, providerClass
-
-
Constructor Summary
Constructors Constructor Description SourceValueBuilder(@NotNull java.lang.Class<S> sourceClass, @NotNull ConfigDataFunction<java.lang.Object,S> sourceParser, @NotNull java.lang.Class<V> valueClass, @NotNull ConfigValueParser<S,V> valueParser, @NotNull ConfigDataFunction<V,S> valueSerializer, @NotNull ConfigDataFunction<S,java.lang.Object> sourceSerializer)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description @NotNull ConfiguredValue<V>
build()
protected @NotNull SourceValueBuilder<S,V>
getThis()
@NotNull SourceValueBuilder<S,V>
parseSource(@NotNull ConfigDataFunction<java.lang.Object,S> sourceParser)
@NotNull SourceValueBuilder<S,V>
parseValue(@NotNull ConfigValueParser<S,V> valueParser)
@NotNull SourceValueBuilder<S,V>
parseValue(ConfigDataFunction<S,V> valueParser)
@NotNull SourceValueBuilder<S,V>
serializeSource(@NotNull ConfigDataFunction<S,java.lang.Object> serializer)
@NotNull SourceValueBuilder<S,V>
serializeValue(@NotNull ConfigDataFunction<V,S> serializer)
-
Methods inherited from class cc.carm.lib.configuration.core.builder.AbstractConfigBuilder
buildManifest, comments, defaults, defaults, from, headerComments, headerComments, inlineComment, path
-
-
-
-
Field Detail
-
sourceClass
@NotNull protected final @NotNull java.lang.Class<S> sourceClass
-
sourceParser
@NotNull protected @NotNull ConfigDataFunction<java.lang.Object,S> sourceParser
-
valueClass
@NotNull protected final @NotNull java.lang.Class<V> valueClass
-
valueParser
@NotNull protected @NotNull ConfigValueParser<S,V> valueParser
-
sourceSerializer
@NotNull protected @NotNull ConfigDataFunction<S,java.lang.Object> sourceSerializer
-
valueSerializer
@NotNull protected @NotNull ConfigDataFunction<V,S> valueSerializer
-
-
Constructor Detail
-
SourceValueBuilder
public SourceValueBuilder(@NotNull @NotNull java.lang.Class<S> sourceClass, @NotNull @NotNull ConfigDataFunction<java.lang.Object,S> sourceParser, @NotNull @NotNull java.lang.Class<V> valueClass, @NotNull @NotNull ConfigValueParser<S,V> valueParser, @NotNull @NotNull ConfigDataFunction<V,S> valueSerializer, @NotNull @NotNull ConfigDataFunction<S,java.lang.Object> sourceSerializer)
-
-
Method Detail
-
getThis
@NotNull protected @NotNull SourceValueBuilder<S,V> getThis()
- Specified by:
getThis
in classAbstractConfigBuilder<V,SourceValueBuilder<S,V>,ConfigurationProvider<?>>
-
parseSource
@NotNull public @NotNull SourceValueBuilder<S,V> parseSource(@NotNull @NotNull ConfigDataFunction<java.lang.Object,S> sourceParser)
-
parseValue
@NotNull public @NotNull SourceValueBuilder<S,V> parseValue(ConfigDataFunction<S,V> valueParser)
-
parseValue
@NotNull public @NotNull SourceValueBuilder<S,V> parseValue(@NotNull @NotNull ConfigValueParser<S,V> valueParser)
-
serializeValue
@NotNull public @NotNull SourceValueBuilder<S,V> serializeValue(@NotNull @NotNull ConfigDataFunction<V,S> serializer)
-
serializeSource
@NotNull public @NotNull SourceValueBuilder<S,V> serializeSource(@NotNull @NotNull ConfigDataFunction<S,java.lang.Object> serializer)
-
build
@NotNull public @NotNull ConfiguredValue<V> build()
- Specified by:
build
in classAbstractConfigBuilder<V,SourceValueBuilder<S,V>,ConfigurationProvider<?>>
-
-