Commit Graph

33 Commits (9143762c89702de02b8fc7e9b218bbd6156c305d)

Author SHA1 Message Date
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 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 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
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 57a9b33673 Add UUID serializer 2 years ago
Exlll 3ea01199db Add serialization support for Bukkit's ConfigurationSerializable types 2 years ago
Exlll f70c44f159 Add toBuilder method to create a builder from a properties object 2 years ago
Exlll 7c4f630f7c ConfigLib v3 2 years ago