Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
[aspectj-dev] Bytecode Weaving

I have stumbled across the restriction that "-injars" cannot contain woven
classes. I have located the original announcement but was surprised that
the compiler didn't handle the situation very well:

   trouble in:
   public class Aspect1 extends java.lang.Object:
     public static final Aspect1 ajc$perSingletonInstance
     static void <clinit>():
                       INVOKESTATIC Aspect1.ajc$postClinit ()V   (line 1)
                       RETURN
     end static void <clinit>()
   :
   :
   :

proceeded by a lengthy BCEL dump. I did find an "already woven" message
though. I am using AspectJ 1.1.1.

My question is will this be a permanent restriction? The beauty of bytecode
weaving is that base application code and aspect libraries can be build
separately then composed using ajc. However the current restriction means
all weaving must be done right at the end of the build which could be
tricky to manage and is undesirable. Plus inadvertent use of aspects early
in the build will cause the final weave to fail disastrously.

Cheers.

Matthew Webster
AOSD Project
Java Technology Centre, MP146
IBM Hursley Park, Winchester,  SO21 2JN, England
Telephone: +44 196 2816139 (external) 246139 (internal)
Email: Matthew Webster/UK/IBM @ IBMGB, matthew_webster@xxxxxxxxxx
http://w3.hursley.ibm.com/~websterm/



Back to the top