Hi Nicolas,

Thanks - indeed, iterating over Moose class methods with 

... methods select: [:m | m kind = 'constructor']

finds all the constructors pretty easily (parentType to find createe). Then it's the incomingInvocations' sender parentType to find the creators. 

Cheers!

On Fri, Mar 30, 2018 at 3:15 AM, Nicolas Anquetil <nicolas.anquetil@inria.fr> wrote:

Hi,

no there is nothing special for <<create>>.

"Creation" actually seems something different than the associations you list: Access, Invocation, Inheritance and Reference can be lexically extracted from the source code and they are fundamental mechanisms of many programming languages.

But it should not be too difficult to model it in Famix and post-process a model to discover all occurences

cheers

nicolas


On 29/03/2018 23:25, Cris Fuhrman wrote:
Hi all -- I'm not sure if I missed it, but does Moose explicitly model the <<creates>> relationship of UML between two classes, e.g.,
Based on http://themoosebook.org/book/index.html#h1thefamixfamilyofmeta-models I found Entity -> SourcedEntity -> Association -> {Access, Invocation, Inheritance, Reference}. In Moose, I can see outgoingInvocations on methods of a class contain "new X" for all the X that a class creates, but I wondered if there's a more efficient way. 

Cheers!


_______________________________________________
Moose-dev mailing list
Moose-dev@list.inf.unibe.ch
https://www.list.inf.unibe.ch/listinfo/moose-dev

-- 
Nicolas Anquetil
RMod team -- Inria Lille

_______________________________________________
Moose-dev mailing list
Moose-dev@list.inf.unibe.ch
https://www.list.inf.unibe.ch/listinfo/moose-dev