[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
[equinox-dev] LinkageError when using after returning aspect in AspectJ for OSGI

I created an aspect bundle (a variation of the demo)

I want to have an initialize method called after a constructor has finished.

The aspect is triggered, but when I want to execute the initialize method, I got a linkage error.
All classes are public and the package is exported.

The aspect is as follows :

package org.eclipse.equinox.weaving.hello.aspects;
import org.aspectj.lang.annotation.AfterReturning;
import org.eclipse.equinox.weaving.demo.hello.internal.Initializable;

public aspect HelloAspect3 { after() returning(Initializable initializable) : call(org.eclipse.equinox.weaving.demo.hello.internal.Initializable+.new(..)) {
if( initializable != null) {
System.out.println("After Initializable Constructor");
} else {
System.out.println("After Non-Initializable Constructor");