Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
Re: [cme-users] Extending queries


Hi Juri,

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(..)))

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?

     Peri


Juri Memmert <memmert@xxxxxxxxxxxx>
Sent by: cme-users-admin@xxxxxxxxxxx

07/27/2004 01:57 PM

Please respond to
cme-users

To
CME Users <cme-users@xxxxxxxxxxx>
cc
Subject
[cme-users] Extending queries





Hi,

on a related topic to my previous post, here's another issue.

Imagine I have a query to identify all calls to a method:

[1] "call( * Cosmos.execute(..))"

Now, I would like to extend the query to the classes which contain the methods
matching this query.

How do I do that? Either it's one of the not-yet-implemented functions or I
don't get it...


                Juri


-----
Now that I have my "APPLE", I comprehend COST ACCOUNTING!!

_______________________________________________
cme-users mailing list
cme-users@xxxxxxxxxxx
http://dev.eclipse.org/mailman/listinfo/cme-users


Back to the top