Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
RE: [aspectj-dev] Missing node in the ASM

Hi, 

Thanks for answering. Actually, I found out why the nodes were missing the
day after I posted the message. I am using the ASM nodes in a metrics tool
that is calculating different source metrics like fan-in/fan-out, coupling
and cohesion. My solution to this problem is now to add an aspect that hits
on all field accesses and method calls and then disregard this aspect in the
calculation. This is not the best solution... So how can I access the AST
nodes?

Tore


----
From: "Mik Kersten" <beatmik@xxxxxxxxx>
To: <aspectj-dev@xxxxxxxxxxx>
Subject: RE: [aspectj-dev] Missing node in the ASM
Date: Mon, 26 Apr 2004 21:38:56 -0700
Reply-To: aspectj-dev@xxxxxxxxxxx

Hi Tore,

The ASM has this slightly odd property of only containing sub-method level
nodes (e.g. a call site, field get/set, or exception handler) if those nodes
are advised.  This is because the model stays in memory, and it would cost
to much to store all of those elements.  Your message prompted me to note
this in org/aspectj/asm/overview.html (and finally start that document).

What are you planning on using the ASM for?  Some things are easier if you
get at the AST nodes directly. 

Mik

> -----Original Message-----
> From: aspectj-dev-admin@xxxxxxxxxxx 
> [mailto:aspectj-dev-admin@xxxxxxxxxxx]
> On Behalf Of Tore Steinmoen
> Sent: Thursday, April 22, 2004 7:07 AM
> To: aspectj-dev@xxxxxxxxxxx
> Subject: [aspectj-dev] Missing node in the ASM
> 
> Hi,
> 
> I have a question concerning the hierarchy accessed in 
> org.aspectj.IHierarchy. Some method calls seem to be missing in the 
> tree.
> 
> This can best be described with an example from the testdata given in 
> the ajde module:
> 
> The method incrXY in figures.primitives.planar.Point
> 
>     public void incrXY(int dx, int dy) {
>         setX(getX() + dx);
>         setY(getY() + dy);
>         int a = dx + dy;
>     }
> 
> results in the following tree:
> 
>         incrXY(int, int)
>           method-call(void figures.primitives.planar.Point.setX(int))
>           method-call(void figures.primitives.planar.Point.setY(int))
> 
> Where the method calss getX() and getY() are missing. Can someone 
> explain me why?
> 
> Sincerely,
> 
> Tore Steinmoen
> Student Norwegian University of Science and Technology, NTNU
> 
> _______________________________________________
> aspectj-dev mailing list
> aspectj-dev@xxxxxxxxxxx
> http://dev.eclipse.org/mailman/listinfo/aspectj-dev



--__--__--

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


End of aspectj-dev Digest



Back to the top