admin@glassfish.java.net

Re: camelCaseName

From: Jason Lee <jason.d.lee_at_oracle.com>
Date: Tue, 18 May 2010 22:08:13 -0500

On 5/18/10 9:49 PM, Bill Shannon wrote:
> Jason Lee wrote on 05/18/2010 06:49 PM:
>> On 5/18/10 2:23 PM, Bill Shannon wrote:
>>> camelCaseName attribute? Looking forward to your writeup of the issues
>>> and decision after our last meeting on this subject...
>> Ask and ye shall receive:
>> http://wiki.glassfish.java.net/Wiki.jsp?page=3.1RestApiCamelCaseNames :)
>
> Thank you!
>
> 95% of the time, aren't we going to see things like
>
> @Param(name="optionname", camelCaseName="optionName")
>
> Wouldn't it be better and simpler to have the command processing
> code just convert all the names to all lower case, or just ignore
> case when matching option names?
I think that's probably a better solution, but, if I recall correctly,
we discussed that and were concerned about unforeseen side effects. If
you feel confident we can just fix the case in the name attribute and
use an alias attribute for those few cases where things don't line up,
then I'm all for that. With regard to the need for the alias attr
specifically, I'll need to revisit why we have the requirement in
there. We may actually be able to work around on the console, which,
iirc, is driving that particular change.
> You have an example in 3.2 where the name and the camelCaseName
> aren't the same (ignoring case). Is that really important?
>
> A feature I intend to add for other reasons is an "alias" for
> an option, e.g.,
>
> @Param(name="node", alias="nodeagent")
>
> Would that be sufficient for the few cases where more than one
> name is needed for an option?
At first glance, that sounds great to me. I'll chew on it some more in
the morning.

Thanks for the feedback.

-- 
Jason Lee
Senior Member of Technical Staff
GlassFish Administration Console
Oracle Corporation
Phone x31197/+1 405-343-1964
Blog http://blogs.steeplesoft.com