One small feature

Jonathan Gibbons Jonathan.Gibbons at Sun.COM
Wed Dec 9 15:26:10 PST 2009


Pavel Tavoda wrote:
> Hello,
> I want one small feature for Java compiler. I want to add method to
> java.lang.reflect.Method similar to Class[] getParameterTypes(), which
> will return parameter names instead of classes which should look like
> String[] getParameterNames(). It's very useful for reflective
> invocation of methods because method parameter types isn't enough.
> If it's too difficult to implement directly in Method class, it will
> be nice just to add some auto generated annotation in compiler.
> Methods like:
>    getXxxDefinition(String name, String description)
> will be transfered by compiler to:
>    getXxxDefinition(@Name("name") String name, @Name("description")
> String description)
>
> I'm new here and never worked on javac source code. However I'm
> skilled architect and coder (more than 10 years experience with Java).
> What should I do to implement this feature?
>
> Regards
>
> Pavel Tavoda
>   
See http://bugs.sun.com/view_bug.do?bug_id=6444738

FWIW, features like this are never as small as they appear, since you 
are proposing
API and/or JVMS changes.

To start learning about javac, start with compiler group's pages at
http://openjdk.java.net/groups/compiler/

-- Jon



More information about the compiler-dev mailing list