Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
Re: [aspectj-users] Using AspectJ to generate documentation

Thanks for the reply Ron.  So it looks like AspectJ isn't quite the
panacea I thought it might be, and I'll have to go back to writing
horrid little awk/sed/grep things for pulling this information out of
our code... *sigh*

Thanks again though,
		Bill.




On Mon, 2004-08-16 at 21:55, Ron Bodkin wrote:
> Hi William,
> 
> AspectJ today can't do what you want: it won't let you use declare warning/declare error to bind parameters because binding is done at runtime and declare warning/error are resolved at weave time.
> 
> I have proposed in past that AspectJ allow the user to use format strings to print _statically resolvable_ context information in declare warning/error (i.e., to allow displaying a type, a method name, a file or line number).
> 
> While one could imagine a version of AspectJ that allowed use of dynamic information (like args) in a context where only static information is available, I don't think it is likely any time soon.
> 
> Ron Bodkin
> Chief Technology Officer
> New Aspects of Software
> o: (415) 824-4690
> m: (415) 509-2895
> 
> 
> > ------------Original Message------------
> > From: William Bland <wjb@xxxxxxxxxxxxxxxxxxxx>
> > To: "AspectJ" <aspectj-users@xxxxxxxxxxx>
> > Date: Mon, Aug-16-2004 9:11 AM
> > Subject: [aspectj-users] Using AspectJ to generate documentation
> >
> > Hello,
> > 	I'm trying to use AspectJ, at compile-time, as a starting point for
> > generating some documentation.  I can't decide whether I've just got 
> > the
> > syntax wrong, or what I'm trying to do is impossible using AspectJ.  My
> > aspect is:
> > 
> > public aspect StatsSystemAspect {
> >   public pointcut ssMethodCall(String str):
> >     call (public void StatsSystem.addStat(String, ..))
> >     && args(str, ..);
> > 
> >   declare warning : ssMethodCall(String str) : str;
> > }
> > 
> > I was hoping that would print, at compile time, all of the Strings that
> > people are passing as a first argument to the StatsSystem.addStat()
> > method (I happen to know these will all be literal).
> > 
> > Sorry if my syntax is just hopelessly wrong - I've only been using
> > AspectJ for a few days!
> > 
> > Any thoughts?
> > 
> > Thanks,
> > 	Bill.
> > -- 
> > Dr. William Bland                          www.abstractnonsense.com
> > Now listening to Nothing (Media player is not running) 
> > 
> > _______________________________________________
> > aspectj-users mailing list
> > aspectj-users@xxxxxxxxxxx
> > http://dev.eclipse.org/mailman/listinfo/aspectj-users
> > 
> > 
> 
> _______________________________________________
> aspectj-users mailing list
> aspectj-users@xxxxxxxxxxx
> http://dev.eclipse.org/mailman/listinfo/aspectj-users
-- 
Dr. William Bland                          www.abstractnonsense.com
Now listening to Nothing (Media player is not running) 



Back to the top