[
Date Prev][
Date Next][
Thread Prev][
Thread Next][
Date Index][
Thread Index]
[
List Home]
Re: [aspectj-users] NoAspectBoundException
|
Ajc is doing what you said:
pointcut constructor(): within(data.dir.*) && execution(new(..))
It's a constructor, and you said the aspect is in the same package.
Wes
Nuno Oliveira wrote:
I took a peek at the TraceEnterLeave.class file and found out that before
advice
was weaved into the aspect constructor itself, hence the error. Is this by
design or just
a bug ?
-----Original Message-----
From: Nuno Oliveira [mailto:noliveira@xxxxxx]
Sent: Wednesday, September 24, 2003 4:04 PM
To: aspectj-users@xxxxxxxxxxx
Subject: [aspectj-users] NoAspectBoundException
I'm getting a NoAspectBoundException thrown from the static getInstance()
method in a singleton class(belonging to the data.dir package), using the
following tracing aspect (in the same package):
public aspect TraceEnterLeave
{
pointcut method(): within(data.dir.*) && execution(* *(..));
pointcut constructor(): within(data.dir.*) && execution(new(..));
before(): method() || constructor()
{
Logger logger = (Logger)
Logger.getLogger(thisJoinPointStaticPart.getSignature().getDeclaringType().g
etName());
logger.enter(thisJoinPointStaticPart.getSignature().getName() ,
thisJoinPoint.getArgs());
}
after() returning(Object r): method()
{
Logger logger = (Logger)
Logger.getLogger(thisJoinPointStaticPart.getSignature().getDeclaringType().g
etName());
logger.leave(thisJoinPointStaticPart.getSignature().getName(), r);
}
after() throwing(Exception e): method()
{
Logger logger = (Logger)
Logger.getLogger(thisJoinPointStaticPart.getSignature().getDeclaringType().g
etName());
logger.leave(thisJoinPointStaticPart.getSignature().getName(), e);
}
}
I've checked the exception definition but am not familiar with the concept
of a bounded aspect. Can someone please explain or point to the source of
the problem ?
Thanks.
_______________________________________________
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