Class FeatureDecorator<T, F extends Enum<F>>
java.lang.Object
net.logstash.logback.decorate.FeatureDecorator<T,F>
- Type Parameters:
T- Type of object being decorated (e.g.JsonFactory)F- Feature enum type (e.g.JsonWriteFeature)
- All Implemented Interfaces:
Decorator<T>
- Direct Known Subclasses:
CborWriteFeatureDecorator, DateTimeFeatureDecorator, EnumFeatureDecorator, JsonNodeFeatureDecorator, JsonWriteFeatureDecorator, MapperFeatureDecorator, SerializationFeatureDecorator, SmileWriteFeatureDecorator, StreamWriteFeatureDecorator, TokenStreamFactoryFeatureDecorator, YamlWriteFeatureDecorator
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidaddDisable(String feature) Disables the feature with the given name.voidEnables the feature with the given name.protected abstract TConfigures the given feature on the given decoratable.Decorates the givendecoratable.voidDisables the given feature.voidEnables the given feature.
-
Constructor Details
-
FeatureDecorator
-
-
Method Details
-
decorate
-
configure
Configures the given feature on the given decoratable.- Parameters:
decoratable- the object to configurefeature- the feature to enable or disablestate- true to enable the feature, false to disable the feature.- Returns:
- the decorated object
-
addEnable
Enables the feature with the given name. Reflectively called by logback when reading xml configuration.- Parameters:
feature- the name of the feature to enable
-
enable
Enables the given feature. Use this method for programmatic configuration.- Parameters:
feature- the feature to enable
-
addDisable
Disables the feature with the given name. Reflectively called by logback when reading xml configuration.- Parameters:
feature- the name of the feature to disable
-
disable
Disables the given feature. Use this method for programmatic configuration.- Parameters:
feature- the feature to disable
-