Closed GoogleCodeExporter closed 9 years ago
Original comment by kandpwel...@gmail.com
on 21 May 2012 at 5:12
When I examined the possibility closer, I realized that it would not be
possible to implement this without abandoning type-safety, and hence forcing
the user to cast everything. So it would be simpler for the user to continue
to just declare the function-objects to have a source type of the non-final
base class or implemented interface of interest (i.e., the type that does
declare the non-final method(s) to be wrapped). In other words, while the goal
was to be able to do:
Function<String,Integer> f = functionFor(callsTo(String.class).length());
... they will instead have to continue to use:
Function<CharSequence,Integer> f = functionFor(callsTo(CharSequence.class).length());
Original comment by kandpwel...@gmail.com
on 27 May 2012 at 3:59
Original issue reported on code.google.com by
kandpwel...@gmail.com
on 21 May 2012 at 3:36