[
Date Prev][
Date Next][
Thread Prev][
Thread Next][
Date Index][
Thread Index]
[
List Home]
Re: [cme-users] Extending queries
|
On Tue, 2004-07-27 at 22:12, Peri Tarr wrote:
Hi Peri,
> Nah, I think we've got you. :-) If you mean you want the classes
> that define the calls to the Cosmos.execute(..) methods, you want this
> query:
>
> containingType(call(* Cosmos.execute(..)))
Thanks, that'll help. :-)
I really hope for a more complete language description, but I know that
you are busy.
> On the other hand, if you're asking for the classes that declare the
> Cosmos.execute(..) methods that are called (as opposed to the classes
> that contain callers of Cosmos.execute(..)), then you'd want to ask
> this differently (but see if you think a different mechanism is also
> needed). I'd first ask for the "calls" relationships:
>
> <rels = relationship calls(* *(..), * Cosmos.execute(..))>;
> The targets of these relationships are the called methods, rather than
> the callers (the callers are what the "call" pointcut gives you--it's
> equivalent to sourceof(relationship calls(* *(..), *
> Cosmos.execute(..)))), and you actually want the *targets*, not the
> sources). So you ask for the containingTypes of the targets to get
> the classes that define the called methods:
>
> containingType(targetof(<rels>));
>
> (or, written without the variable,
> "containingType(targetof(relationship calls(* *(..), *
> Cosmos.execute(..))))".)
>
> Does that help?
Yes, it does help... to make my head hurt. ;-)
No, really, that does help... I'll have to set up a Wiki somewhere to
jot this all down for later reference.
Did anyone think of this so far?
Juri
-----
The race is not always to the swift, nor the battle to the strong, but
that's the way to bet. -- Damon Runyon