creating module ids

Jonathan Gibbons Jonathan.Gibbons at Sun.COM
Tue Nov 10 10:55:33 PST 2009


Brian Pontarelli wrote:
> On Nov 10, 2009, at 11:46 AM, Jonathan Gibbons wrote:
>
>> Mark Reinhold wrote:
>>>> Date: Mon, 09 Nov 2009 17:06:54 -0800
>>>> From: jonathan.gibbons at sun.com
>>>>
>>>
>>>
>>>> Is there a way to create a module id from a pair of strings, 
>>>> representing the
>>>> name and version, or do I have to join them together so that
>>>> ModuleSystem.parseModuleId can break them apart again?
>>>>
>>>
>>> I've been meaning to add a
>>>
>>>    ModuleSystem.parseModuleId(String name, String version)
>>>
>>> method for a while now.  I'll push a changeset in a moment.
>>>
>>> - Mark
>>>
>> Is there any reason not to make the constructors accessible -- e.g. 
>> ModuleId(String name, Version version) ?
>> Having to go through parse methods all the time to create objects is, 
>> well, tedious.
>>
>
> Constructors bad. Factories better.
>
> -bp
>
Factories ok; parsing from strings every time: bad.

-- Jon



More information about the jigsaw-dev mailing list