For Coin 8: preservation of parameter names in class files

Joe Darcy joe.darcy at
Mon Dec 20 07:56:25 PST 2010

Hello Florian.

Hold that thought, coin: the flip side, won't get underway for a while, 
but the ability to retrieve parameter names from class files is a 
long-standing request from various parties so I'm sure it will be 
considered again for JDK 8.


Florian Weimer wrote:
> 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
> time.
> 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
> java.lang.reflect.)

More information about the coin-dev mailing list