Skip to main content

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


Is your advice executed when you run your program? The code you have posted will not compile. It is neither AspectJ code style nor @AspectJ annotation style.

Matthew Webster
Tools UI Strategy
CICS Technical Planning & Strategy, MP189
IBM United Kingdom Limited
Hursley Park, Winchester,  SO21 2JN, England
Telephone: +44 196 2816139 (external) 246139 (internal)



"nospam@wolterinkwebdesign" <nospam@xxxxxxxxxxxxxxxxxxxxxx>
Sent by: aspectj-users-bounces@xxxxxxxxxxx

16/05/2007 11:17

Please respond to
aspectj-users@xxxxxxxxxxx

To
aspectj-users@xxxxxxxxxxx
cc
Subject
[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?




_______________________________________________
aspectj-users mailing list
aspectj-users@xxxxxxxxxxx
https://dev.eclipse.org/mailman/listinfo/aspectj-users







Unless stated otherwise above:
IBM United Kingdom Limited - Registered in England and Wales with number 741598.
Registered office: PO Box 41, North Harbour, Portsmouth, Hampshire PO6 3AU







Back to the top