Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
[aspectj-users] problems with binary weaving

Hi all,

I'm using AspectJ to weave some changes into class files of a jar. The changes are some minor ones. Actually, just one simple aspect like this:

public aspect A {

       declare parents: CompilationUnit implements SomeInterface;

       public void CompilationUnit.someMethod() {

       }

       //...
}

Bascially, I'm telling it that CompilationUnit implements SomeInterface, and the methods of the interface are added to the class via ITDs. However, when I compile the project, the jar is not created (and, if it exists, is deleted), and I get no information from the compiler about the errors. But, if I comment out the declare parents statement, everything works fine and the outjar is created.

There's one detail, I don't know if that's important, but CompilationUnit and SomeInterface are in different jars, that are both in the classpath of the project and in the aspectJ inpath.

Anyone can tell me why the declare parents statement breaks the compilation?

thanks,
Davi Pires

Back to the top