Direct extension method use warning

Rémi Forax forax at
Tue Dec 7 00:57:31 PST 2010

On 12/07/2010 09:22 AM, Thomas Jung wrote:
>> (A further problem with use-site extension methods is the lack of reflective
>> discovery.  Consumers of classfiles (such as non-Java compilers like JRuby, as
>> well as templating mechanism such as JSP EL) cannot easily find these
>> extension methods.)
> Wouldn't it be useful to annotate a method (e.g. Collection.sort) as
> an extension method implementation? Users that invoke the method
> directly would get a (deprecation) warning. (The annotation is not
> strictly necessary as the extension method declaration makes it
> implicitly an extension method implementation.) This warning could
> help to move to the "new style".

and get better performance if the extension method is overriden
in implementation.


> Thomas


More information about the lambda-dev mailing list