It is about type safety more than anything else, meaning you can't possibly
pass an invalid value. One could also say it is the "proper" implementation
of enumerations in Java 5+, but I prefer the first argument.

If we choose enums, we can split header and parameter names, for example, in
types like <ComponentPrefix>Headers <ComponentPrefix>Params (e.g:
FreemarkerHeaders and FreemarkerParams) instead of having to diff them in
classes/interfaces w/ prefixes like HEADER_ and PARAM_ -- I like this.

What do you guys think?

On Tue, May 24, 2011 at 5:28 AM, Willem Jiang <willem.ji...@gmail.com>wrote:

> If we are using enums, what kind of benefit can we get compare to use class
> or interface ?
>
> +1 to align this.
>
> Willem
>
>
> On 5/24/11 1:08 AM, Fernando Ribeiro wrote:
>
>> Claus, anyone?
>>
>> On Tue, May 17, 2011 at 4:35 PM, Fernando Ribeiro<
>> webmas...@fernandoribeiro.eti.br>  wrote:
>>
>>  Me neither, but agree we should align this, may also use enums, as JDK
>>> 1.4
>>> was already dropped, what do you think, everybody?
>>>
>>> On Tue, May 17, 2011 at 4:30 PM, Christian Müller<
>>> christian.muel...@gmail.com>  wrote:
>>>
>>>  We have classes and interfaces, e.g.:
>>>>
>>>> interface -->  org.apache.camel.component.cxf.CxfConstants
>>>> class -->  org.apache.camel.component.jms.JmsConstants
>>>>
>>>> We should align this. At present, I don't have any preferences.
>>>>
>>>> Christian
>>>>
>>>> On Mon, May 16, 2011 at 11:20 PM, Fernando Ribeiro<
>>>> webmas...@fernandoribeiro.eti.br>  wrote:
>>>>
>>>>  Any feedback yet? Thanks.
>>>>>
>>>>> On Fri, May 13, 2011 at 3:53 PM, Fernando Ribeiro<
>>>>> webmas...@fernandoribeiro.eti.br>  wrote:
>>>>>
>>>>>  All,
>>>>>>
>>>>>> Is there any agreement here about whether we use interfaces, classes
>>>>>>
>>>>> or
>>>>
>>>>> enums for constants? If so, are there naming conventions that we use
>>>>>>
>>>>> or
>>>>
>>>>> would like to use going forward?
>>>>>>
>>>>>> Thanks,
>>>>>>
>>>>>> Fernando
>>>>>>
>>>>>>
>>>>>
>>>>
>>>
>>>
>>
>
> --
> Willem
> ----------------------------------
> FuseSource
> Web: http://www.fusesource.com
> Blog:    http://willemjiang.blogspot.com (English)
>         http://jnn.javaeye.com (Chinese)
> Twitter: willemjiang
>
> Connect at CamelOne May 24-26
> The Open Source Integration Conference
> http://camelone.com
>

Reply via email to