Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
[aspectj-users] more on binary weaving

Hi all,

   I've managed to change the bytecode of eclipse plugins using binary weaving, thanks to the help of this list.

   I've tried a few simlpe examples, and most of them worked fine. However, I had to use the -Xlint:warning option because the weaver was trying to weave into other libraries that I don't even know how he tries to get there. By the way, I'm trying to weave into ajde.jar, from AJDT.

   Without the -Xlint:warning parameter, I got a cantFindType error from the compiler. After that, it worked fine when I tried to do some simple inter-type declarations. But when I tried to use a declare parents statement, it didn't work. The classes hierarchy is not changed. My code is like this:

====  Foo.java
package tests;

interface Foo {
    public static final int bar = 1;
}

==== ASTNature.aj
package tests;

import org.aspectj.org.eclipse.jdt.core.dom;

aspect ASTNature {
     declare parents: CompilationUnit implements Foo;
}


    In the outjar, the class CompilationUnit does not implement Foo interface, as expected. I suspect it has something to do with the cantFindType error but I Might Be Wrong.


thanks,
Davi Pires

Back to the top