Skip to main content

Generating AspectJ Programs with Meta-AspectJ

  • Conference paper

Part of the book series: Lecture Notes in Computer Science ((LNCS,volume 3286))

Abstract

Meta-AspectJ (MAJ) is a language tool for generating AspectJ programs using code templates. MAJ itself is an extension of Java, so users can interleave arbitrary Java code with AspectJ code templates. MAJ is a structured meta-programming tool: a well-typed generator implies a syntactically correct generated program. MAJ promotes a methodology that combines aspect-oriented and generative programming. Potential applications range from implementing domain-specific languages with AspectJ as a back-end to enhancing AspectJ with more powerful general-purpose constructs. In addition to its practical value, MAJ offers valuable insights to meta-programming tool designers. It is a mature meta-programming tool for AspectJ (and, by extension, Java): a lot of emphasis has been placed on context-sensitive parsing and error-reporting. As a result, MAJ minimizes the number of meta-programming (quote/unquote) operators and uses type inference to reduce the need to remember type names for syntactic entities.

This is a preview of subscription content, log in via an institution.

Buying options

Chapter
USD   29.95
Price excludes VAT (USA)
  • Available as PDF
  • Read on any device
  • Instant download
  • Own it forever
eBook
USD   39.99
Price excludes VAT (USA)
  • Available as PDF
  • Read on any device
  • Instant download
  • Own it forever
Softcover Book
USD   54.99
Price excludes VAT (USA)
  • Compact, lightweight edition
  • Dispatched in 3 to 5 business days
  • Free shipping worldwide - see info

Tax calculation will be finalised at checkout

Purchases are for personal use only

Learn about institutional subscriptions

Preview

Unable to display preview. Download preview PDF.

Unable to display preview. Download preview PDF.

References

  1. Bachrach, J., Playford, K.: The Java syntactic extender (JSE). In: Proceedings of the OOPSLA 2001 conference on Object Oriented Programming Systems Languages and Applications, pp. 31–42. ACM Press, New York (2001)

    Google Scholar 

  2. Baker, J., Hsieh, W.C.: Maya: multiple-dispatch syntax extension in Java. In: Proceedings of the ACM SIGPLAN 2002 Conference on Programming Language Design and Implementation, pp. 270–281. ACM Press, New York (2002)

    Chapter  Google Scholar 

  3. Batory, D., Lofaso, B., Smaragdakis, Y.: JTS: tools for implementing domainspecific languages. In: Proceedings Fifth International Conference on Software Reuse, Victoria, BC, Canada, pp. 143–153. IEEE, Los Alamitos (1998)

    Google Scholar 

  4. Batory, D., Sarvela, J.N., Rauschmayer, A.: Scaling step-wise refinement. In: Proceedings of the 25th International Conference on Software Engineering, pp. 187–197. IEEE Computer Society, Los Alamitos (2003)

    Chapter  Google Scholar 

  5. Bryant, A., Catton, K.: De Volder, and G. C. Murphy. Explicit programming. In: Proceedings of the 1st international conference on Aspect-Oriented Software Development, pp. 10–18. ACM Press, New York (2002)

    Chapter  Google Scholar 

  6. Calcagno, C., Taha, W., Huang, L., Leroy, X.: Implementing multi-stage languages using ASTs, gensym, and reflection. In: Pfenning, F., Smaragdakis, Y. (eds.) GPCE 2003. LNCS, vol. 2830, pp. 57–76. Springer, Heidelberg (2003)

    Chapter  Google Scholar 

  7. Chiba, S.: A metaobject protocol for C++. In: ACM Conference on Object-Oriented Programming Systems, Languages, and Applications (OOPSLA 1995), SIGPLAN Notices, Austin, Texas, USA, vol. 30(10), pp. 285–299 (October 1995)

    Google Scholar 

  8. Clinger, W.: Macros that work. In: Proceedings of the 18th ACM SIGPLAN-SIGACT symposium on Principles of Programming Languages, pp. 155–162. ACM Press, New York (1991)

    Chapter  Google Scholar 

  9. Kiczales, G., Hilsdale, E., Hugunin, J., Kersten, M., Palm, J., Griswold, W.: Getting started with AspectJ. Communications of the ACM 44(10), 59–65 (2001)

    Article  Google Scholar 

  10. Kohlbecker, E., Friedman, D.P., Felleisen, M., Duba, B.: Hygienic macro expansion. In: Proceedings of the 1986 ACM conference on LISP and functional programming, pp. 151–161. ACM Press, New York (1986)

    Chapter  Google Scholar 

  11. Parr, T.J., Quong, R.W.: ANTLR: A predicated LL(k) parser generator. Software, Practice and Experience 25(7), 789–810 (1995)

    Article  Google Scholar 

  12. Sheard, T., Jones, S.P.: Template meta-programming for Haskell. In: Proceedings of the ACM SIGPLAN workshop on Haskell, pp. 1–16. ACM Press, New York (2002)

    Chapter  Google Scholar 

  13. Shonle, M., Lieberherr, K., Shah, A.: Xaspects: An extensible system for domain specific aspect languages. In: OOPSLA 2003, Domain-Driven Development Track (October 2003)

    Google Scholar 

  14. Smaragdakis, Y., Batory, D.: Scoping constructs for program generators. In: Generative and Component-Based Software Engineering Symposium (GCSE), Earlier version in Technical Report UTCS-TR-96-37 (1999)

    Google Scholar 

  15. Soares, S., Laureano, E., Borba, P.: Implementing distribution and persistence aspects with AspectJ. In: Proceedings of the 17th ACM SIGPLAN conference on Object-oriented programming, systems, languages, and applications, pp. 174–190. ACM Press, New York (2002)

    Chapter  Google Scholar 

  16. Stevens, A., et al.: XDoclet Web site, http://xdoclet.sourceforge.net/

  17. Taha, W., Sheard, T.: Multi-stage programming with explicit annotations. In: Partial Evaluation and Semantics-Based Program Manipulation, Amsterdam, The Netherlands, June 1997, pp. 203–217. ACM Press, New York (1997)

    Chapter  Google Scholar 

  18. Tilevich, E., Urbanski, S., Smaragdakis, Y., Fleury, M.: Aspectizing server-side distribution. In: Proceedings of the Automated Software Engineering (ASE) Conference, October 2003, IEEE Press, Los Alamitos (2003)

    Google Scholar 

  19. Visser, E.: Meta-programming with concrete object syntax. In: Batory, D., Consel, C., Taha, W. (eds.) GPCE 2002. LNCS, vol. 2487, pp. 299–315. Springer, Heidelberg (2002)

    Chapter  Google Scholar 

  20. Weise, D., Crew, R.F.: Programmable syntax macros. In: SIGPLAN Conference on Programming Language Design and Implementation, pp. 156–165 (1993)

    Google Scholar 

Download references

Author information

Authors and Affiliations

Authors

Editor information

Editors and Affiliations

Rights and permissions

Reprints and permissions

Copyright information

© 2004 Springer-Verlag Berlin Heidelberg

About this paper

Cite this paper

Zook, D., Huang, S.S., Smaragdakis, Y. (2004). Generating AspectJ Programs with Meta-AspectJ. In: Karsai, G., Visser, E. (eds) Generative Programming and Component Engineering. GPCE 2004. Lecture Notes in Computer Science, vol 3286. Springer, Berlin, Heidelberg. https://doi.org/10.1007/978-3-540-30175-2_1

Download citation

  • DOI: https://doi.org/10.1007/978-3-540-30175-2_1

  • Publisher Name: Springer, Berlin, Heidelberg

  • Print ISBN: 978-3-540-23580-4

  • Online ISBN: 978-3-540-30175-2

  • eBook Packages: Springer Book Archive

Publish with us

Policies and ethics