Module dev.metaschema.core
Interface IMutableConfiguration<T extends IConfigurationFeature<?>>
- Type Parameters:
T- the type of the feature set
- All Superinterfaces:
IConfiguration<T>
- All Known Subinterfaces:
IBindingModuleLoader,IBoundLoader,IDeserializer<CLASS>,ISerializer<CLASS>
- All Known Implementing Classes:
AbstractDeserializer,AbstractSerializer,BindingModuleLoader,DefaultBoundLoader,DefaultConfiguration,DefaultConstraintValidator,DefaultJsonDeserializer,DefaultJsonSerializer,DefaultXmlDeserializer,DefaultXmlSerializer,DefaultYamlDeserializer,DefaultYamlSerializer
public interface IMutableConfiguration<T extends IConfigurationFeature<?>>
extends IConfiguration<T>
This interface provides methods for retrieving and updating the configuration
of processors and parsers in this library. This provides a mutable view of
the current configuration.
-
Method Summary
Modifier and TypeMethodDescription@Owning IMutableConfiguration<T>applyConfiguration(IConfiguration<T> other) Replace this configuration with theotherconfiguration.default @Owning IMutableConfiguration<T>disableFeature(T feature) Turn off the provided feature.default @Owning IMutableConfiguration<T>enableFeature(T feature) Turn on the provided feature.@Owning IMutableConfiguration<T>Set the value of the providedfeatureto the provided value.Methods inherited from interface dev.metaschema.core.configuration.IConfiguration
get, getFeatureValues, isFeatureEnabled
-
Method Details
-
enableFeature
Turn on the provided feature.- Parameters:
feature- the feature to turn on- Returns:
- the updated configuration
- Throws:
UnsupportedOperationException- if the feature is not a boolean valued feature- See Also:
-
disableFeature
Turn off the provided feature.- Parameters:
feature- the feature to turn off- Returns:
- the updated configuration
- Throws:
UnsupportedOperationException- if the feature is not a boolean valued feature- See Also:
-
applyConfiguration
@NonNull @Owning @Owning IMutableConfiguration<T> applyConfiguration(@NonNull IConfiguration<T> other) Replace this configuration with theotherconfiguration.- Parameters:
other- the new configuration- Returns:
- the updated configuration
-
set
Set the value of the providedfeatureto the provided value.- Parameters:
feature- the feature to setvalue- the value to set- Returns:
- the updated configuration
- Throws:
UnsupportedOperationException- if the provided feature value is not assignment compatible with the features value type- See Also:
-