directory-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Guillaume Nodet <gno...@gmail.com>
Subject Re: Code review - constants in interface
Date Mon, 22 Nov 2010 16:42:04 GMT
For classes that are designed to export constants, there should be no
constructor at all, so even if you're right in theory, i don't think
that really apply here (as you're not supposed to add any constructor
to that class).

On Mon, Nov 22, 2010 at 17:35, Emmanuel Lecharny <elecharny@gmail.com> wrote:
> On 11/22/10 5:09 PM, Hammond, Steven wrote:
>>
>> Maybe I am off, but I thought other classes already cannot inherit from
>> it, because it has a private constructor.
>
> It does. But it's not convenient. That forces you to declare *all* the
> constructor private. If you miss one of them, then the class can be
> extended. Using 'final' as a qualifier for the class does protect the full
> class completely, even if the class evolve (AFAIU)
>
>
> --
> Regards,
> Cordialement,
> Emmanuel L├ęcharny
> www.iktek.com
>
>



-- 
Cheers,
Guillaume Nodet
------------------------
Blog: http://gnodet.blogspot.com/
------------------------
Open Source SOA
http://fusesource.com

Mime
View raw message