Re: [fpc-other] Object Pascal Interface Delegation, but in Java

2017-09-10 Thread Graeme Geldenhuys
On 2017-09-10 00:31, Marco van de Voort wrote: And you don't risk forgetting adding a method to existing classes Java will give a compilation error if you do, so nothing to worry about there. always a risk with manual workarounds like the codegeneration tools that assume everything is

Re: [fpc-other] Object Pascal Interface Delegation, but in Java

2017-09-09 Thread Marco van de Voort
In our previous episode, Graeme Geldenhuys said: > > That is often called delegation, and if you search for java and delegation, > > it seems not (which is not THAT surprising IMHO): > > Thanks Marco. So it is actually similar to Object Pascal where you use > object composition, but with Object

Re: [fpc-other] Object Pascal Interface Delegation, but in Java

2017-09-09 Thread Graeme Geldenhuys
On 2017-09-09 18:17, Graeme Geldenhuys wrote: I'm sure Eclipse must have that code-generation functionality built-in or an add-on that can do that. And my guess was correct. :) In Eclipse select "Source -> Generate Delegate Methods". Select the field variable that will do the delegation.

Re: [fpc-other] Object Pascal Interface Delegation, but in Java

2017-09-09 Thread Graeme Geldenhuys
On 2017-09-09 17:39, Marco van de Voort wrote: That is often called delegation, and if you search for java and delegation, it seems not (which is not THAT surprising IMHO): Thanks Marco. So it is actually similar to Object Pascal where you use object composition, but with Object Pascal's

Re: [fpc-other] Object Pascal Interface Delegation, but in Java

2017-09-09 Thread Marco van de Voort
In our previous episode, Graeme Geldenhuys said: > > Does anybody familiar with Object Pascal and Java know if Java supports > something similar to Object Pascal's Interface Delegation "implements > syntax" functionality? That is often called delegation, and if you search for java and

[fpc-other] Object Pascal Interface Delegation, but in Java

2017-09-08 Thread Graeme Geldenhuys
Hi, Does anybody familiar with Object Pascal and Java know if Java supports something similar to Object Pascal's Interface Delegation "implements syntax" functionality? Regards, Graeme ___ fpc-other maillist - fpc-other@lists.freepascal.org