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.
Access this chapter
Tax calculation will be finalised at checkout
Purchases are for personal use only
Preview
Unable to display preview. Download preview PDF.
Similar content being viewed by others
References
Jan Bosch. Design Patterns as Language Constructs. Journal of Object Oriented Programming, 1997.
Peter J. Brown. Macro Processors and Techniques for Portable Software. Wiley, 1974.
Shigeru Chiba. A Metaobject Protocol for C++. SIGPLAN Notices, 30(10):285–299, 1995.
Shigeru Chiba. Macro Processing in Object-Oriented Languages. In Proceedings of TOOLS Pacific’ 98, Australia, November 1998. IEEE, IEEE Press.
Pierre Cointe. Metaclasses are First Class: the ObjVlisp Model. SIGPLAN Notices, 22(12):156–162, December 1987.
Erich Gamma, Richard Helm, Ralph Johnson, and John Vlissides. Design Patterns-Elements of Reusable Object-Oriented Software. Addison-Wesley, 1994.
Joseph Gil and David H. Lorenz. Design Patterns and Language Design. IEEE Computer, 31(3):118–120, March 1998.
Adele Goldberg and Dave Robson. Smalltalk-80: The Language. Addison Wesley, 1989.
Yuji Ichisugi and Yves Roudier. Extensible Java Preprocessor Kit and Tiny Data-Parallel Java. In Proceedings of ISCOPE’97, California, December 1997.
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.
JavaSoft. Java Core Reflection API and Specification. online publishing, January 1997.
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.
Gregor Kiczales, Jim Rivières, and Daniel G. Bobrow. The Art of the Metaobject Protocol. The MIT Press, 1991.
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.
William Maddox. Semantically-Sensitive Macroprocessing. Master’s thesis, University of California, Berkeley, 1989. ucb/csd 89/545.
Pattie Maes. Concepts and Experiments in Computational Reflection. SIGPLAN Notices, 22(12):147–155, October 1987.
Jiri Soukup. Implementing Patterns. In Pattern Languages of Program Design, chapter 20, pages 395–412. Addison-Wesley, 1995.
Guy L. Steel Jr. Common Lisp: The Language. Digital Press, 2nd edition, 1990.
Daniel Weise and Roger Crew. Programmable Syntax Macros. SIGPLAN Notices, 28(6):156–165, 1993.
Author information
Authors and Affiliations
Editor information
Editors and Affiliations
Rights 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