Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
RE: [aspectj-users] Aspectj discussion

Title: Message
 
Gregor Kiczales wrote:
Yes, the idiom of using:
 
  - an interface to name a role within the pattern
  - having an aspect define advice and introductions on the interface
  - and using declare parents in other aspects to say what classes play the role in concrete patterns
 
is the way to go here.
 
One additional suggestion is to make the interface, i.e. Singleton, a protected inner interface of the
pattern, i.e. SingletonAspect.  That often makes code like this look better, because it makes it clear
that the interface really only has meaning withing the aspect (or extensions of the aspect).
 
Mira Mezini and I had a paper at AOSD'03 that discussed the pros and cons
of the idiom/pattern mentioned above by Gregor. In that paper we also make a proposal
on how this and similar idioms can be expressed more directly with new
programming language constructs. This paper ("Conquering Aspects
With Caesar") can be downloaded at http://caesarj.org
 
Klaus
 

Back to the top