[
Date Prev][
Date Next][
Thread Prev][
Thread Next][
Date Index][
Thread Index]
[
List Home]
Re: [aspectj-users] [Newbie] How to filter out packages/classes in trace aspect
|
Josh,
Try this instead:
protected
pointcut
loggedOperations() : (
(execution(*
*.*(..)) || execution(*.new(..))))
&&
!within(com.mycompany.dbutils..*)
&&
!within(com.mycompany.MySpecificObject)
//
&& (
//
!execution(* com.mycompany.dbutils..*(..))
//
&& !execution(* com.mycompany.MySpecificObject.*
(..))
//
)
&&
!within(IndentedLogging+
);
Matthew Webster
AOSD Project
Java Technology Centre, MP146
IBM United Kingdom Limited
Hursley Park, Winchester, SO21 2JN, England
Telephone: +44 196 2816139 (external) 246139 (internal)
Josh <gemini929@xxxxxxxxx>
Sent by: aspectj-users-bounces@xxxxxxxxxxx
05/04/2007 14:07
Please respond to
aspectj-users@xxxxxxxxxxx |
|
To
| aspectj-users <aspectj-users@xxxxxxxxxxx>
|
cc
|
|
Subject
| [aspectj-users] [Newbie] How to filter
out packages/classes in trace aspect |
|
All,
I am trying to use the TraceAspect to document program
flow. I would like to ignore specific packages and in some cases,
specific classes. The notation that I am using below does not appear
to be working as expected though. How can I filter out packages/classes
correctly?
Regards,
Josh
public aspect TraceAspect extends IndentedLogging {
protected pointcut loggedOperations() : (
(execution(* *.*(..)) || execution(*.new(..))))
&& (
!execution(* com.mycompany.dbutils..*(..))
&& !execution(* com.mycompany.MySpecificObject.*
(..))
)
&& !within(IndentedLogging+
);
before() : loggedOperations() {
Signature sig = thisJoinPointStaticPart.getSignature();
System.out.println("Entering ["
+ sig.getDeclaringType().getName() + "."
+ sig.getName() + "]");
}
}_______________________________________________
aspectj-users mailing list
aspectj-users@xxxxxxxxxxx
https://dev.eclipse.org/mailman/listinfo/aspectj-users
Unless stated otherwise above:
IBM United Kingdom Limited - Registered in England and Wales with number
741598.
Registered office: PO Box 41, North Harbour, Portsmouth, Hampshire PO6
3AU