Skip to main content

Kava - A Reflective Java Based on Bytecode Rewriting

  • 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

Current implementations of reflective Java typically either require access to source code, or require a modified Java platform. This makes them unsuitable for applying reflection to Commercial-off-the-Shelf (COTS) systems. The high level nature of Java bytecode makes on-the-fly rewritings of class files feasible and this has been exploited by a number of authors. However, in practice working at bytecode level is error prone and leads to fragile code. We propose using metaobject protocols in order to specify behavioural changes and use standard bytecode rewritings to implement the changes. We have developed a reflective Java called Kava that provides behavioural runtime reflection through the use of bytecode rewriting of Java classes. In this paper we discuss the binary rewriting approach, provide an overview of the Kava system and provide an example of an application of Kava.

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. Massimo Ancona, Walter Cazzola, and Eduardo B. Fernandez. Reflective Authorization Systems: Possibilities, Benefits and Drawbacks. In Jan Vitek and Christian Jensen, editors, Secure Internet Programming: Security Issues for Mobile and Distributed Objects, Lecture Notes in Computer Science 1603, pages 35–51. Springer-Verlag, July 1999.

    Google Scholar 

  2. Messaoud Benantar, Bob Blakley and Anthony J. Nadalin. Approach to Object Security in Distributed SOM. IBM Systems Journal, 35(2):204–226, 1996.

    Article  Google Scholar 

  3. Ole Agesen, Stephen N. Freund and John C. Mitchell. Adding Type Parameterization. In Proceedings of OOPSLA’97. Atlanta, Georgia. 1997.

    Google Scholar 

  4. Shigeru Chiba. Load-time Structural Reflection in Java. In Proceedings of ECOOP’2000. June 2000.

    Google Scholar 

  5. Geoff A. Cohen and Jeff Chase. Automatic Program Transformation with JOIE. In Proceedings of USENIX Annual Technical Symposium. 1998.

    Google Scholar 

  6. Grzegorz Czaijkowski and Thorsten von Eicken. JRes: A Resource Accounting Interface for Java. In Proceedings of OOPSLA’98. 1998.

    Google Scholar 

  7. Michael Gölm. Design and Implementation of a Meta Architecture for Java. Master’s thesis, University of Erlangen-Nurnberg, Germany, January 1997.

    Google Scholar 

  8. Joao Guimarães. Reflection for Statically Typed Languages. In Proceedings of ECOOP’98. July 1998.

    Google Scholar 

  9. IBM. Bean Extender Documentation, version 2.0. 1997.

    Google Scholar 

  10. Ralph Keller and Urs Holzle. Binary Component Adaptation. In Proceedings of ECOOP’98. July 1998.

    Google Scholar 

  11. Ruiz-Garcia Marc-Olivier Killijian, Jean-Charles Fabre and Shigeru Chiba. A Metaobject Protocol for Fault-Tolerant CORBA Applications. In Proceedings of the 17th Symposium on Reliable Distributed Systems (SRDS’98), pages 127–134, 1998.

    Google Scholar 

  12. Gregor Kickzales, Jim des Rivières, and Daniel G. Bobrow. The Art of the Metaobject Protocol. MIT Press, Cambridge, Massachusetts, 1991.

    Google Scholar 

  13. Sheng Liang and Gilad Bracha. Dynamic Class Loading in the Java™ Virtual Machine. In Proceedings of OOPSLA’98, Vancouver, Canada, October 1998.

    Google Scholar 

  14. Satoshi Matsuoka, Hirotaka Ogawa, Kouya Shimura, Yasunori Kimura, Koichiro Hotta, and Hiromitsu Takagi. OpenJIT A Reflective Java JIT Compiler. In Proceedings of OOPSLA’98 Workshop on Reflective Programming in C++ and Java, November 1998.

    Google Scholar 

  15. Alexandre Olivia, Luis Eduardo Buzato, and Calciolari Islene. The Reflective Architecture of Guaraná. http://www.dcc.unicamp.br/oliva.

  16. Insik Shin and John C. Mitchell. Java Bytecode Modification and Applet Security. Stanford CS Tech Report. 1998.

    Google Scholar 

  17. Robert J. Stroud. Transparency and Reflection in Distributed Systems. ACM Operating System Review, 22:99–103, April 1992.

    Google Scholar 

  18. Robert J. Stroud and Zhixue Wu. Using Metaobject Protocols to Satisfy Non-Functional Requirements. In Chris Zimmerman, editor, Advances in Object-Oriented Metalevel Architectures and Reflection, chapter 3, pages 31–52. CRC Press, Inc., 2000 Corporate Blvd., N.W., Boca Raton, Florida 33431, 1996.

    Google Scholar 

  19. Robert J. Stroud and Zhixue Wu. Using Meta-Object Protocol to Implement Atomic Data Types. In Walter Olthoff, editor, Proceedings of the 9th Conference on Object-Oriented Programming (ECOOP’95), LNCS 952, pages 168–189, Aarhus, Denmark, August 1995. Springer-Verlag.

    Google Scholar 

  20. Sun Microsystems, Inc. Java Development Kit version 1.3.0 Documentation. 2000.

    Google Scholar 

  21. Michiaki Tatsubori and Shigeru Chiba. Support of Design Patterns with Compile-time Reflection. In Shigeru Chiba and Jean-Charles Fabre, editors, Proceedings of OOPSLA Workshop on Reflective Programming in C++ and Java, Vancouver, Canada, November 1998.

    Google Scholar 

  22. Ian Welch and Robert J. Stroud. Dalang-A Reflective Extension for Java. Computing Science Technical Report CS-TR-672, University of Newcastle upon Tyne. 1999.

    Google Scholar 

  23. Ian Welch and Robert J. Stroud. From Dalang to Kava-The Evolution of a Reflective Java Extension. In Proceedings of Meta-Level Architectures and Reflection, Second International Conference, Reflection 1999, page 19–21. Saint-Malo, France. LNCS 1616, Springer. July 1999.

    Google Scholar 

  24. Ian Welch and Robert J. Stroud. Supporting Real World Security Models in Java. In Proceedings of 7th IEEE International Workshop on Future Treads of Distributed Computing Systems, pages 20–22. Cape Town, South Africa. TIEEE Computer Society. December 1999.

    Google Scholar 

  25. Zhixue Wu and Scarlet Schwiderski. Reflective Java-Making Java Even More Flexible. FTP: Architecture Projects Management Limited (http://apm@ansa.co.uk), Cambridge, UK. 1997.

  26. Chris Zimmerman. Metalevels, MOPs and What all the Fuzz is All about. In Chris Zimmerman, editor, Advances in Object-Oriented Metalevel Architectures and Reflection, chapter 1, pages 3–24. CRC Press, Inc., 2000 Corporate Blvd., N.W., Boca Raton, Florida 33431, 1996.

    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

Welch, I., Stroud, R.J. (2000). Kava - A Reflective Java Based on Bytecode Rewriting. 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_9

Download citation

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

  • 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