[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: Multiple pattern matches for OPP
Hi Neil,
On Mon, 30 Oct 2000 23:01:32 -0500
Neil Aggarwal <neil@JAMMConsulting.com> wrote:
> Hello:
>
> I am new to ozone and am still trying to learn how to
> work with it.
>
> One thing I see is that it would be a nice feature to
> have a multiple pattern matching listing for the opp
> processor to determine which methods are update methods
> and which are readonly methods.
>
> For example, a pattern match on any of these patterns would
> be useful:
> .set*
> .addTo*
> .removeFrom*
> The first one can be used when setting the value of a class
> member variable, such as setName().
> The next one is useful when adding an item to a collection,
> such as addToNames().
> The last one is usefule when removing an item from a collection,
> such as removeFromNames().
Regular Expressions already have the capabilities for grouping.
So something like the following RE
(set.*|addTo.*|removeFrom.*)
should work with the current implementation. Could be possible
that it is necessary to quote the meta characters '(', ')' and
'|' with a prepended '\' - this depends on the used RE implementation.
> I think I see how to do this in ProxyGenerator.java by making
> it use a collection of RE objects instead of a single instance,
> but I wanted to make sure that I coordinate with the rest of
> the developers before doing anything.
>
> Here is what I am thinking of using for syntax:
> opp -p".set*:.addTo*:.removeFrom*" [...]
>
> The colons will separate the different patterns that
> we are trying to use.
>
> Does anyone see a problem with this or can suggest a better
> syntax?
>
> If I make this change, what is the procedure to contribute
> it?
>
> Thanks,
> Neil.
>
> --
> Neil Aggarwal, President & CEO
> JAMM Consulting, Inc. -- (972) 612-6056, http://www.JAMMConsulting.com
> Custom Programming in Java, C++, HTML, perl
Regards,
Lars
--
___________________________________________________________________
Lars Martin mailto:lars@smb-tec.com
SMB GmbH http://www.smb-tec.com