As Stephen said, with the introduction of the Pattern Matching in the near
future, an API to extract the values from an object (the de-constructor API) or
at least from a record object will have to be created, but it may be based on
method handles, so perhaps not using a direct interface.
Rémi
Following up on this, it does feel like the use case is now simply not
possible. I have a similar problem with
ClassLoader.getResources(String) in threeten-extra.
https://github.com/ThreeTen/threetenbp-extra/blob/master/src/main/java/org/threeten/extra/scale/SystemUTCRules.java#L202
The ThreeTen-
What is needed is an abstraction that can work for all sorts of
data-like classes
- classic JavaBeans
- records
- value types
- HashMaps
- JSON objects
- etc
Its not rocket science as an API, but has been needed for many years
as so many projects have this code duplicated (leading to lots of
subt
- Mail original -
> De: "Stephen Colebourne"
> À: "jigsaw-dev"
> Envoyé: Mercredi 7 Mars 2018 13:23:10
> Objet: Re: java.beans package in java.desktop module
> What is needed is an abstraction that can work for all sorts of
> data-like classes
>
> - classic JavaBeans
> - records
> - v
On 07/03/2018 12:11, Stephen Colebourne wrote:
Following up on this, it does feel like the use case is now simply not
possible. I have a similar problem with
ClassLoader.getResources(String) in threeten-extra.
https://github.com/ThreeTen/threetenbp-extra/blob/master/src/main/java/org/threeten/
On 7 March 2018 at 12:59, Alan Bateman wrote:
> You've dismissed services but I would expect it to provide a nice solution.
> The service interface might be very simple, something like:
>
> public interface LeapSecondDataProvider {
> LeapSecondData data();
> }
Configuration and code are two v
On 2018-03-07T15:14:11 +
Stephen Colebourne wrote:
>
> Effectively what is needed is another way for a library to be informed
> of the presence of the calling application. One possible solution to
> this would be to allow users to write module initialization code in
> module-info.java. Then an
On 07/03/2018 15:14, Stephen Colebourne wrote:
:
Configuration and code are two very different things. Asking projects
and end users to write code for something that should be config is a
huge no-no.
My view is that JPMS has made using configuration files, especially
for libraries, a lot harder.