db-jdo-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Craig L Russell <Craig.Russ...@Sun.COM>
Subject Re: Enhancer specification text for discussion
Date Mon, 22 Dec 2008 18:14:30 GMT
Hi Matthew,

On Dec 22, 2008, at 9:45 AM, Matthew Adams wrote:

> Looks pretty good to me.  One question, below, though.
> On Dec 21, 2008, at 3:41 PM, Craig L Russell wrote:
>> -<option>: If a parameter begins with a "-" is found, it is added  
>> to the other options list via the addOptions method.
> What is the format of the -<option> arguments for unary and non- 
> unary arguments?

The proposal is that non-standard options are unary only. If you need  
parameters, do what Java does with system properties: - 

> That is, some options may take no arguments, one argument, or more  
> than one argument.  How does the standard enhancer analyze and pass  
> these to the implementation?

I struggled with trying to make it work and came up way short.
> For example, if I have three vendor-specific arguments foo, bar, and  
> goo, used like this,
> ... -r -v -foo -bar bararg -goo gooarg1 gooarg2 acme-domain.jar
> how does the standard enhancer know that gooarg1 and gooarg2 are  
> arguments to not resource or directory names?  If the syntax is
> <option>[<whitespace><option-value>[<whitespace><option-value>[...]]
> I don't think it could.  This might require a different format of  
> the form
> <option>[:<option-value>[<whitespace><option-value>[...]]
> and the use of platform-specific characters (quotes, double quotes,  
> etc) to indicate that the option's arguments should be read  
> together.  To avoid this, the form could be instead
> <option>[:<option-value>[<option-value-separator><option-value>[...]]
> where <option-value-separator> could be in some list of specified  
> values like comma, semicolon, colon, etc.

I think that we don't need to do anything with -options that are not  
standard. Just dump them as is into the options list. There is plenty  
of flexibility in the -D pattern. In fact, the main reason for using  
white space in the -option <option-parameter> is for ease of parsing  
(implementation view) and ease of use (user view). Win win!

> -matthew

Craig L Russell
Architect, Sun Java Enterprise System http://db.apache.org/jdo
408 276-5638 mailto:Craig.Russell@sun.com
P.S. A good JDO? O, Gasp!

View raw message