Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
[aspectj-users] How do I weave aspects into SOME classes in a jar?



Hi All,

I try to weave aspect into a jar file, but I only wants some classes have
the aspect.

I tried the following aspect:

pintcut  myClasses() : within(com.myco..*) && ! within
(java.lang.Throwable+);

before() : execute(* *(..)) && myClasses() { ...}

After jac -injar some.jar -outjar somenew.jar

the somenew.jar has aspect code in every classes. What was wrong with my
aspect?

Thanks in advance.
----------------------------------------------------------
  Dr. Bo Yi
  WAS L3 Support
  IBM Toronto Lab
  A2-713/Q2Z/8200/MKM
  8200 Warden Ave. Markham ONT. L6G 1C7
  Phone: 905-413-4819
  Tie Line: 969-4819
  E-Mail: boyi@xxxxxxxxxx



Back to the top