Pluggable aspect instantiation models

David Lorenz, Victor Trakhtenberg

Research output: Chapter in Book/Report/Conference proceedingConference contributionpeer-review


An aspect encapsulates not only crosscutting behavior, but also crosscutting state. When aspects are stateful, there is a need to specify and control their instantiation. Unfortunately, aspect instantiation is a hard-wired feature in AspectJ. This feature cannot be customized by the application programmer. Specifically, there are six pre-defined instantiation models to choose from, each designated by a keyword: issingleton, perthis, pertarget, percflow, percflowbelow, pertypewithin. In this work, we introduce a new language mechanism and keyword 'perscope' that lets third-parties define custom aspect instantiation models. This new keyword replaces the six existing keywords in AspectJ, and may eliminate the need for introducing future ones.

Original languageEnglish
Title of host publicationProceedings of the 10th International Symposium on Software Composition (SC'11)
PublisherSpringer Verlag
Number of pages16
ISBN (Print)9783642220449
StatePublished - 2011
Event10th International Conference on Software Composition, SC 2011 - Zurich, Switzerland
Duration: 30 Jun 20111 Jul 2011

Publication series

NameLecture Notes in Computer Science (including subseries Lecture Notes in Artificial Intelligence and Lecture Notes in Bioinformatics)
Volume6708 LNCS
ISSN (Print)0302-9743
ISSN (Electronic)1611-3349


Conference10th International Conference on Software Composition, SC 2011

Bibliographical note

This research was supported in part by the Israel Science Foundation (ISF) under grant No. 926/08.


Dive into the research topics of 'Pluggable aspect instantiation models'. Together they form a unique fingerprint.

Cite this