For Coin 8: preservation of parameter names in class files

Florian Weimer fweimer at
Mon Dec 20 02:11:19 PST 2010

IDEs need parameter names for code templates (stubs for inherited
abstract methods, delegates, etc.) and completion of invocations.
Currently, debug information is used if available, or information
parsed from Javadoc.  There are useful constructs which are currently
difficult to implement due to the lack of parameter names.  For
instance, there was a lightweight SQL mapping proposal in the JDBC
update for JDK 6 which had to be killed because it turned out to be
close to unimplementable due to lack of method parameter names at run

The implementation would likely use attributes and not change the
class file format.  java.lang.reflect.Constructor and
java.lang.reflect.Method would get a new method, getParameterNames(),
which returns a fresh array array of parameter names (or an
unmodifiable list, if you want sharing).  I'm not sure if the
implementation should try to extract parameter names from debugging
information if available.  If no parameter names are available, the
new methods should throw IllegalStateException, in the spirit of the
most of the java.lang.reflect API, which prefers exceptions over null
return values.

(I think this is a language change because it updates classes in

Florian Weimer                <fweimer at>
BFK edv-consulting GmbH
Kriegsstraße 100              tel: +49-721-96201-1
D-76133 Karlsruhe             fax: +49-721-96201-99

More information about the coin-dev mailing list