Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
[aspectj-dev] DOMs and ASTs (for metrics tool purpose)

Hello,

I'm on planning stage of development of metrics suite for aspectj 
programs. The suite will be consisted mainly of CK metrics.
I've following requirements:
 - suite should measure java and aj files
 - suite should be aware of java5 new language constructs
 - tool should be run from console (ant) without *running*
   eclipse


I would like to use AspectJ for this manner and I started
look into AspectJ's source models and syntax trees.

JDT provides DOM for this kind of purposes, but after a while I
find out, that AspectJ don't inherit it, and even modified JDT
version will reject .aj files.

After digging a while in mail archives, I found out that AJDT
provides ASM model for similar proposes. I found examples for it, and
it looks quite nice, but... it can reach only to method/advice level.
For computing method complexity or detecting aspect-object coupling
this is not enough :|

At the end, I looked at AJDT ASTs, which inherit JDT ASTs. From
developer docs (btw. a good one) I know that it provides statement
level, so its granulity is that what I need. 

Do you think AST will be good for my purposes?
Where can I get some examples how to obtain AST for a file?


best regards,
-- 
Michal Stochmialek <misto@xxxxxxxxxxxxxxxx>


Back to the top