Skip to main content

OpenJava: A Class-Based Macro System for Java

  • Conference paper
  • First Online:
Reflection and Software Engineering (OORaSE 1999)

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

Included in the following conference series:

Abstract

This paper presents OpenJava, which is a macro system that we have developed for Java. With traditional macro systems designed for non object-oriented languages, it is difficult to write a number of macros typical in object-oriented programming since they require the ability to access a logical structure of programs. One of the drawbacks of traditional macro systems is that abstract syntax trees are used for rep-resenting source programs. This paper first points out this problem and then shows how OpenJava addresses this problem. A key idea of Open-Java is to use metaobjects, which was originally developed for reflective computing, for representing source programs.

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

Access this chapter

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

Institutional subscriptions

Preview

Unable to display preview. Download preview PDF.

Unable to display preview. Download preview PDF.

References

  1. Jan Bosch. Design Patterns as Language Constructs. Journal of Object Oriented Programming, 1997.

    Google Scholar 

  2. Peter J. Brown. Macro Processors and Techniques for Portable Software. Wiley, 1974.

    Google Scholar 

  3. Shigeru Chiba. A Metaobject Protocol for C++. SIGPLAN Notices, 30(10):285–299, 1995.

    Article  Google Scholar 

  4. Shigeru Chiba. Macro Processing in Object-Oriented Languages. In Proceedings of TOOLS Pacific’ 98, Australia, November 1998. IEEE, IEEE Press.

    Google Scholar 

  5. Pierre Cointe. Metaclasses are First Class: the ObjVlisp Model. SIGPLAN Notices, 22(12):156–162, December 1987.

    Article  Google Scholar 

  6. Erich Gamma, Richard Helm, Ralph Johnson, and John Vlissides. Design Patterns-Elements of Reusable Object-Oriented Software. Addison-Wesley, 1994.

    Google Scholar 

  7. Joseph Gil and David H. Lorenz. Design Patterns and Language Design. IEEE Computer, 31(3):118–120, March 1998.

    Google Scholar 

  8. Adele Goldberg and Dave Robson. Smalltalk-80: The Language. Addison Wesley, 1989.

    Google Scholar 

  9. Yuji Ichisugi and Yves Roudier. Extensible Java Preprocessor Kit and Tiny Data-Parallel Java. In Proceedings of ISCOPE’97, California, December 1997.

    Google Scholar 

  10. Yutaka Ishikawa, Atsushi Hori, Mitsuhisa Sato, Motohiko Matsuda, Jörg Nolte, Hiroshi Tezuka, Hiroki Konaka, and Kazuto Kubota. Design and Implementation of Metalevel Architecture in C++-MPC++ Approach-. In Proceedings of Reflection’96, pages 153–166, 1996.

    Google Scholar 

  11. JavaSoft. Java Core Reflection API and Specification. online publishing, January 1997.

    Google Scholar 

  12. Gregor Kiczales, John Lamping, Anurag Mendhekar, Chris Maeda, Cristina Videira Lopes, Jean Marc Loingtier, and John Irwin. Aspect-Oriented Programming. LNCS 1241, pages 220–242, June 1997.

    Google Scholar 

  13. Gregor Kiczales, Jim Rivières, and Daniel G. Bobrow. The Art of the Metaobject Protocol. The MIT Press, 1991.

    Google Scholar 

  14. David A. Ladd and J. Christopher Ramming. A*: A Language for Implementing Language Processors. IEEE Transactions on Software Engineering, 21(11):894–901, November 1995.

    Article  Google Scholar 

  15. William Maddox. Semantically-Sensitive Macroprocessing. Master’s thesis, University of California, Berkeley, 1989. ucb/csd 89/545.

    Google Scholar 

  16. Pattie Maes. Concepts and Experiments in Computational Reflection. SIGPLAN Notices, 22(12):147–155, October 1987.

    Article  Google Scholar 

  17. Jiri Soukup. Implementing Patterns. In Pattern Languages of Program Design, chapter 20, pages 395–412. Addison-Wesley, 1995.

    Google Scholar 

  18. Guy L. Steel Jr. Common Lisp: The Language. Digital Press, 2nd edition, 1990.

    Google Scholar 

  19. Daniel Weise and Roger Crew. Programmable Syntax Macros. SIGPLAN Notices, 28(6):156–165, 1993.

    Article  Google Scholar 

Download references

Author information

Authors and Affiliations

Authors

Editor information

Editors and Affiliations

Rights and permissions

Reprints and permissions

Copyright information

© 2000 Springer-Verlag Berlin Heidelberg

About this paper

Cite this paper

Tatsubori, M., Chiba, S., Killijian, MO., Itano, K. (2000). OpenJava: A Class-Based Macro System for Java. In: Cazzola, W., Stroud, R.J., Tisato, F. (eds) Reflection and Software Engineering. OORaSE 1999. Lecture Notes in Computer Science, vol 1826. Springer, Berlin, Heidelberg. https://doi.org/10.1007/3-540-45046-7_7

Download citation

  • DOI: https://doi.org/10.1007/3-540-45046-7_7

  • Published:

  • Publisher Name: Springer, Berlin, Heidelberg

  • Print ISBN: 978-3-540-67761-1

  • Online ISBN: 978-3-540-45046-7

  • eBook Packages: Springer Book Archive

Publish with us

Policies and ethics