Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
RE: [aspectj-users] problem with pointcut capturing the second ar gument of a constructor call

Hi Tim
Is the problem that you have declared you are collecting context "emailConst(String[] to)" but you haven't bound it to any args?
i.e. should it be "&& args(*, String[] to, ..);"
Elizabeth
-----Original Message-----
From: aspectj-users-bounces@xxxxxxxxxxx [mailto:aspectj-users-bounces@xxxxxxxxxxx]On Behalf Of Timothy Perrigo
Sent: October 4, 2007 1:39 PM
To: aspectj-users@xxxxxxxxxxx
Subject: [aspectj-users] problem with pointcut capturing the second argument of a constructor call

This really has me stumped...according to everything I've read, I think the pointcut below should accomplish what I need, but I cannot get it to compile (I'm getting the following compile error:  "Syntax error on token ";", Type expected after this token").

Here is the pointcut definition:

    pointcut emailConstruction(String[] to) :
        call(public werner.ais.battery.util.Email.new(..))
        && args(*, String[] ,..);

I'm trying to define a pointcut on a constructor call for the Email class, and I want to capture the second argument (which is a String array).  The error message is coming from the last line of the pointcut (the args(*, String[], ..) part).  I'm stumped...Does anyone know what I might be doing wrong?

Any suggestions would be very much appreciated!

Thanks,
Tim





CONFIDENTIAL AND PRIVILEGED INFORMATION NOTICE

This e-mail, and any attachments, may contain information that
is confidential, subject to copyright, or exempt from disclosure.
Any unauthorized review, disclosure, retransmission, 
dissemination or other use of or reliance on this information 
may be unlawful and is strictly prohibited.  

AVIS D'INFORMATION CONFIDENTIELLE ET PRIVILÉGIÉE

Le présent courriel, et toute pièce jointe, peut contenir de 
l'information qui est confidentielle, régie par les droits 
d'auteur, ou interdite de divulgation. Tout examen, 
divulgation, retransmission, diffusion ou autres utilisations 
non autorisées de l'information ou dépendance non autorisée 
envers celle-ci peut Ãªtre illégale et est strictement interdite.

Back to the top