Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
[aspectj-users] Aspect Consturctor & Instantiation

Hello all,

I have a constructor without arguments in an aspect but it is never called!
When i'm reading the documentation they say that aspects are instantiated...
but why not using the contrcutor,

example code:

========
class DiscCache {
// constructor
public DiscCache(File dir);
}

class CachingAspect extends DiscCache {

public CachingAspect() {
super(new File("c:/temp/");
System.out.println(" Aspect Constructor called ");
}

}
============

Now the CachingAspect also has pointcuts and advices,.. and there are joinpoints.
But the constructor of CachingAspect is never called!

How should i implement this?






Back to the top