Proposal: Deprecate Builders

Tom Schindl tom.schindl at bestsolution.at
Thu Apr 4 03:52:59 PDT 2013


What I wanted to highlight is that while FXML could deal with the 
fx-classes, it can't know what class I defined and it needs a way to 
create instances of them, until today I could provide my custom builder 
to it.

Useing annotation sounds like a good idea. Just to see if I get this 
we'd have something like this then:

public MyClass {
   public MyClass(@FXMLValue("x") int x, @FXMLValue("y") int y) {

   }
}

instead of having a MyClassBuilder

class MyClassBuilder {
    public MyClassBuilder x() {

    }

    public MyClassBuilder y() {

    }
}


Tom

On 04.04.13 12:44, Milan Kubec wrote:
> Yes and that's exactly the reason I've created the list of classes that
> are affected by Builders removal.
> We are thinking about some kind of annotations for constructor parameters.
>
>    Milan
>
>
> Dne 4.4.2013 11:30, Tom Schindl napsal(a):
>> Hi,
>>
>> Well this is the internal list but what we should not forget is what
>> happens if I created a class with readonly attributes (=has
>> constructor args).
>>
>> In case we remove the builders we need to have a replacement how to
>> integrate those objects into FXML.
>>
>> Tom
>



More information about the openjfx-dev mailing list