I am generating the Java from XML. The setters all return void. If they returned "this", then they could be called in a chain. Is there a way ( an easy way ) to make it generate setters that "return this;" ?
Take a look at the JAXB Fluent API Plugin.
 USAddress address = new USAddress()
            .withName(name)
            .withStreet(street)
            .withCity(city)
            .withState(state)
            .withZip(new BigDecimal(zip));
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With