You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@creadur.apache.org by Robert Burrell Donkin <ro...@blueyonder.co.uk> on 2013/03/25 13:11:03 UTC
[tentacles] Factoring Out Nested Classes?
Tentacles uses a lot of nested classes. I tend to prefer to keep one
class per file where possible (makes merging changes easier, for
example) but I wanted to check whether there were any objections to me
factoring out these classes - or whether anyone knows a reason why this
might be a bad idea...?
Robert
Re: [tentacles] Factoring Out Nested Classes?
Posted by "P. Ottlinger" <po...@aiki-it.de>.
Hi,
Am 25.03.2013 21:19, schrieb sebb:
> However if the nested class is very small, leave it - it's clearer.
I'd prefer to avoid nested classes (except for enumerations). They
prevent easy testing ...
Just my 2ct.
Cheers
Philipp
Re: [tentacles] Factoring Out Nested Classes?
Posted by sebb <se...@gmail.com>.
On 25 March 2013 12:11, Robert Burrell Donkin
<ro...@blueyonder.co.uk> wrote:
> Tentacles uses a lot of nested classes. I tend to prefer to keep one class
> per file where possible (makes merging changes easier, for example) but I
> wanted to check whether there were any objections to me factoring out these
> classes - or whether anyone knows a reason why this might be a bad idea...?
Separate class files forces package protection where private might have been OK.
And separate package protected classes can be unit-tested.
However its public and protected access that cause long-term support
requirements if one wants to maintain binary compat.
So I don't think it's too big a deal.
However if the nested class is very small, leave it - it's clearer.
> Robert