Commit Graph

48 Commits (cb44743d41fcf7681ffe6d36cf5e6b6649647644)

Author SHA1 Message Date
Exlll cb44743d41
Update version to 4.5.0 9 months ago
Exlll da54300c96 Document post-processing 9 months ago
Exlll 45c94ef994 Update version to 4.4.0 10 months ago
Exlll 9ff59e2ca4 Update version to 4.3.0
* Added a new interface, IOStreamConfigurationStore, that provides the two methods
  read and write which take an InputStream and OutputStream, respectively. This
  interface is implemented by the YamlConfigurationStore class.
* Added several static methods to the YamlConfigurations class that correspond to
  these new read/write methods.
12 months ago
Exlll a5d05e256c Add IOStreamConfigurationStore
This commit adds the new interface IOStreamConfigurationStore that provides two
new methods, one for reading configurations from InputStreams and a second
for writing configurations to OutputStreams. This interfaces is implemented
by the YamlConfigurationStore class.
1 year ago
Exlll ba79c08b07 Improve documentation 2 years ago
Exlll f6e12de95a Update version to 4.2.0
**Support for polymorphic serialization**

This release adds the Polymorphic and PolymorphicTypes annotations that
can be used on types. Serializers for polymorphic types are not
selected based on the compile-time types of configuration elements, but
instead are chosen at runtime based on the actual types of their values.
This enables adding instances of subclasses / implementations of a
polymorphic type to collections.

 **Add SerializeWith annotation**

This annotation enforces the use of the specified serializer for a
configuration element or type. It can be applied to configuration
elements (i.e. class fields and record components), to types, and to
other annotations.

 **Add SerializerContext interface**

Instances of this interface contain information about the context in which
a serializer was selected. They are passed to the constructors of custom
serializers if the serializers are instantiated by this library, or can
alternatively be accessed through the new `addSerializerFactory` method
of `ConfigurationProperties` objects.
2 years ago
Exlll 0eb73815be Add miscellaneous test cases 2 years ago
Exlll 268ce78163 Improve documentation
Among other things, document Polymorphic and PolymorphicTypes
annotations in README.
2 years ago
Exlll 9f4999c726 Add support for polymorphic serialization
This commit adds the Polymorphic annotation that can be used on types.
Serializers for polymorphic types are not selected based on the
compile-time types of configuration elements, but instead are chosen at
runtime based on the actual types of their values. This enables adding
instances of subclasses / implementations of a polymorphic type to
collections.
2 years ago
Exlll 37ad956d8e Add 'addSerializerFactory' method to properties
The factory method gives access to a SerializerContext object which is
not accessible if 'addSerializer' is used.
2 years ago
Exlll f0c76d5c5a Add documentation about SerializeWith and SerializerContext 2 years ago
Exlll eaccf30d5e Rename TypeComponent to ConfigurationElement and refactor it
This commit also introduces the term "configuration element" to refer to
either a class field or record component of a configuration type.
2 years ago
Exlll 0f3656a21b Update version to 4.1.0
* Added jitpack.io support (by @RobotHanzo)
* Added two new NameFormatters (by @Insprill)
  - LOWER_KEBAB_CASE
  - UPPER_KEBAB_CASE
* Fixed handling of comments that contain newlines (by @Insprill)
2 years ago
Exlll e1dcacb1a1 Update documentation 2 years ago
Exlll bfbda2f629 Update version to 4.0.0
This update contains several new features:

* Support for Java records
* Support for File, Path, URL, URI, Instant
* New project structure that makes it easier to add support
  for additional file types

... and some breaking changes:

* The code for saving and loading YAML files was moved from the
  configlib-core to the configlib-yaml module:
  * The Configurations class has been renamed to YamlConfigurations
    and its methods lost their -YamlConfiguration affix.
* FieldFormatter has been renamed to NameFormatter
2 years ago
Exlll d1acb875c2 Remove update with default configuration.
Default values for Records can now be provided through constructors
that have no parameters.
2 years ago
Exlll 5b9c7754b4 Move to new project structure 2 years ago
Exlll bff27c06b1 Allow calls to update with a default configuration 2 years ago
Exlll 6ee99ff619 Update documentation for Records 2 years ago
Exlll 7e79597cdd Add support for Record serialization 2 years ago
Exlll 31748db01b Add support for Instant, File, Path, URL, and URI 2 years ago
Exlll 3112ea1bce Update version to 3.1.0 2 years ago
Exlll 57a9b33673 Add UUID serializer 2 years ago
Exlll c2c35daab2 Add documantation about ConfigurationSerializable support 2 years ago
Exlll 7c4f630f7c ConfigLib v3 2 years ago
Exlll 65555f7dd6 Publish on master push, update "Import" README section 3 years ago
Exlll 38b1a1aca4 Added @Format annotation
This annotation can be used to apply a FieldNameFormatter
to a Configuration without having to instantiate a Properties
object. The FieldNameFormatter returned by the annotation
takes precedence over the value returned by the Properties object.

Added FieldNameFormatters.UPPER_UNDERSCORE
6 years ago
Exlll 58b81f3314 Added FieldFilter
If your configuration has a lot of fields and you want to exclude some
of these fields without making them final, static or transient, you can
configure your properties object to use additional FieldFilters.

A FieldFilter filters the fields of a configuration class by a specified
criterion. For example, if you only want to include fields whose names
don't start with 'ignore', you would add the following filter:

YamlProperties properties = YamlProperties.builder()
                .addFilter(field -> !field.getName().startsWith("ignore"))
                // ...
                .build();
6 years ago
Exlll b8caedc86d Fix: Converting back fails for nested collections of complex ConfigurationElements
Note that you now have to set a nesting level when using nested
collections that require the ElementType annotation.
6 years ago
Exlll ee53d0c609 Fix: Comments not saved if FieldNameFormatter is used 6 years ago
Exlll 7f600834ff Improve documentation 6 years ago
Exlll 71a6052e29 Make ConfigLib Java 8 compatible 6 years ago
Exlll 49e5b56b5c Update ConfigLib to version 2.0.0 6 years ago
Exlll e1b629d5df update version 7 years ago
Exlll 108133abc0 added versioning 7 years ago
Exlll 9ae4731de4 fix postLoadHook not executed 7 years ago
Exlll a61363aefd fix type conversion 8 years ago
Exlll 71f342783b clean-up, improvements, fixes, docs 8 years ago
Exlll 6b72d6293c support for lists, sets and maps of custom objects 8 years ago
Exlll 0e9b474db1 better support for custom classes 8 years ago
Exlll 0dca3f614f serialize custom classes 8 years ago
Exlll 5352d4183c better usage example 8 years ago
Exlll fbca8cdcb0 renamed modules 8 years ago
Exlll e7ce5ad632 JavaDoc added 8 years ago
Exlll 3bf8e64d93 added .travis.yml 8 years ago
Exlll 720ca8f47f added loadAndSave method 8 years ago
Exlll 174fd25fe5 Create README.md 8 years ago