next up previous contents index
Next: Support Classes Up: Support for generic library Previous: Support for generic library   Contents   Index

Generic element type

The current HPJava translator also allows library routines to be written (in Java) in such a way that they are generic with respect to the element type of multiarray arguments. The Java implementation should present a formal paramter of type Object for the elements array. The corresponding actual argument (provided by the translator according to the scheme in section A.4.15) will be a Java array--the Java implementation of the method or constructor will presumably test the actual element type at execution time.

This feature was introduced specifically to provide better support for the Adlib.aprintf() routine. It does not require any change to the translation scheme described so far--it only involves a change to the HPJava type checker.



Bryan Carpenter 2003-04-15