Software—Practice & Experience
Evaluating Java runtime reflection for implementing cross-language method invocations
Proceedings of the 8th International Conference on the Principles and Practice of Programming in Java
Hi-index | 0.00 |
Abstract: Compared to dynamic object-oriented languages like CommonLisp or Smalltalk, Java has a fairly simple and restrictive object and type system. Some of the key Differences between Java and these other languages is that they offer structural conformance, automatic delegation, and dynamic mixins. When such constructs are needed in a language like Java, they are usually expressed in terms of standard obj ct-oriented design patterns, requiring the manual implementation of "glue" or "helper" classes. This paper describes ways in which such features can be provided efficiently and automatically in terms of Java's platform-independent binary format and dynamic loading mechanisms. The implementation does not require any changes to the Java runtime, bytecodes, or class loader and yields performance comparable to manually implemented design patterns. The approach should prove useful both as a programming tool for Java and as an strategy for building efficient implementations of dynamic languages on top of the Java virtual machine.