Commit Graph

87 Commits (cb44743d41fcf7681ffe6d36cf5e6b6649647644)
 

Author SHA1 Message Date
Exlll cb44743d41
Update version to 4.5.0 9 months ago
Exlll 3f02b4e920 Improve documentation 9 months ago
Exlll da54300c96 Document post-processing 9 months ago
Exlll d88c584921 Improve exception handling and add more post-processor tests 9 months ago
Exlll 31d4d09e85 WIP: Add support for post-processing via annotated configuration elements 10 months ago
Exlll 89a2e9057b Add support for post-processing via annotated method 10 months ago
Exlll ef6fb19651 Add PostProcess annotation 10 months ago
Exlll 45c94ef994 Update version to 4.4.0 10 months ago
William dcb8aafb4a
Add builder option to specify charset for file encoding (#28)
* feat: Make read/write charset configurable, default to UTF-8

* refactor: Make charset final in FileConfigurationProperties

* test: add unit tests

* refactor: use system/environment encoding by default

* test: fix spacing in test class

* test: removed unused import
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 ef7c611939 Make ConfigurationProperties public
This class is part of the public API (e.g. through the SerializerContext
 interface), so it should be accessible.
1 year ago
Exlll 9143762c89 Update Gradle and dependencies 1 year ago
Alisson Lopes dc010a01f1
Window Test Support (#25)
* Windows Test Support - Add helper methods to convert the unix absolute path to the Jimfs's supported Windows path

* Windows Test Support - Bump Jimfs version

* Windows Test Support - Implement helper methods to the needed paths

* Windows Test Support - Implement helper methods to the needed paths and remove the unsupported (on Windows) newline character in the filename

* Windows Test Support - Statically importing the helper methods

* Windows Test Support - Statically importing the helper methods and changing the constant field names to good practices
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 482e9464a9 Add PolymorphicTypes annotation
This annotation can be used to provide type aliases for subtypes which
are then used instead of Java class names.
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 30430527a1 Allow SerializeWith (meta-)annotation on types 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 bb58025239 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 serializer classes define such a constructor.
2 years ago
Exlll c78f4b2901 Change TypeComponent and SerializerSelector to use AnnotatedType 2 years ago
Exlll 1c38f85177 Refactor SerializerSelectorTest 2 years ago
Exlll 96321dd682 Add support for SerializeWith annotation 2 years ago
Exlll 0a291fe922 Move SerializerMapper functionality to TypeSerializer 2 years ago
Exlll 3c25327f7f Refactor TypeComponent 2 years ago
Exlll 7ce9c6b1c6 Add componentGenericType to TypeComponent 2 years ago
Exlll 48aef6a48c Let generic type of TypeComponent extend AnnotatedElement 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
Pierce Thompson ce87129094
Properly handle multi-line comments split with the newline character (#17)
* Properly handle multi-line comments split with the newline character
* Don't discard trailing newlines
* Add unit tests
2 years ago
Pierce Thompson 26dfd4d6b5
Add kebab-case name formatters (#16) 2 years ago
RobotHanzo 54762f8bb5
Support building with jitpack (#13) 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 e5028e6199 Add top-level saving/loading support for Records
Records can now be saved and loaded directly using one of the several
methods available.

Also, the TypeSerializer has been refactored.
2 years ago
Exlll a2153106b5 Add support for Record component comments 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 5216a889af
Update issue templates 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