ServiceLoader
Tom Eugelink
tbee at tbee.org
Tue Sep 3 13:53:46 PDT 2013
No, but there is a less-than-optimal-but-fast approach, and that is to write a custom BuilderFactory with if statements for all 3rd party controls.
On 2013-09-03 20:46, Richard Bair wrote:
> It is a real problem though (how to support 3rd party controls well). Is there a JIRA for this case?
>
> Richard
>
> On Sep 3, 2013, at 11:44 AM, Tom Eugelink <tbee at tbee.org> wrote:
>
>> True, so we'll leave it JFXtras then.
>>
>>
>> On 2013-09-03 20:28, Richard Bair wrote:
>>> The only knee-jerk reaction to the service loader is that it can be bad at startup, because for the service loader to work, it has to scan all jar files, which means downloading all jar files. Maybe with Jigsaw we'll have a better mechanism for this such that we can just read the first few bytes of a module and determine whether it supports a certain service or not.
>>>
>>> Richard
>>>
>>> On Sep 3, 2013, at 9:43 AM, Tom Eugelink <tbee at tbee.org> wrote:
>>>
>>>> On 2013-09-03 17:49, Richard Bair wrote:
>>>>>> In this case, since JavaFX is Free Software! you can actually suggest
>>>>>> the fix, prototype and propose the patch yourself, limiting the round
>>>>>> trip time substantially.
>>>>>>
>>>> That said, in JFXtras I've created an extended FactoryBuilder that dynamically loads builder classes using Java's standard ServiceLoader approach. Would this be of interest for inclusion directly into JavaFX?
>>>> https://github.com/JFXtras/jfxtras-labs/blob/2.2/src/main/java/jfxtras/labs/fxml/JFXtrasBuilderFactory.java
>>>>
>>>> It does require a slightly extended Builder interface though.
>>>> https://github.com/JFXtras/jfxtras-labs/blob/2.2/src/main/java/jfxtras/fxml/BuilderService.java
>>>>
>>>> A little blabla about this on this blog entry:
>>>> http://tbeernot.wordpress.com/2013/08/25/fxml-builders-detection/
>>>>
>>>> Tom
>>>>
>>
More information about the openjfx-dev
mailing list