Spec updates for method parameter reflection

Paul Benedict pbenedict at apache.org
Mon Nov 12 18:53:49 PST 2012


On Mon, Nov 12, 2012 at 6:07 PM, Remi Forax <forax at univ-mlv.fr> wrote:

> If there is no default opt in, I think we should withdraw that feature
> from Java 8.
> There are two problems, if you don't provide a default, either nodoby will
> use it
> because it's no reliable, you can already extract local variable table
> from the bytecode,
> so you can have the name of the parameters, but because you need to opt-in
> to have debug information, it's not reliable for people that write
> bytecode enhancer
> or use reflection to implement meta protocols.
> Or the default opt-in will be vendors or tools specific, and it will be a
> mess.
> "Oh, you have compiled with ant/maven, that's why it doesn't work, you
> should use
> whateverIsTheNameOfTheVendorTo**ol to enable EJB/REST/etc implementation
> to work".
>
>
I think whatever Oracle chooses will be a trendsetter. If Oracle values
smaller class files over storing parameter names as a default, developers
will follow the lead and not rely on the information ever being present.
You might as well not provide the feature. It's not realistically useful if
the extra metadata is optional.

Paul



More information about the enhanced-metadata-spec-discuss mailing list