Dynamic (i.e responding to methodNotFound) classes in Java
john.r.rose at oracle.com
Fri Jun 14 02:05:48 UTC 2013
On Jun 13, 2013, at 6:26 PM, Behrang Saeedzadeh <behrangsa at gmail.com> wrote:
> A couple of years ago I downloaded an experimental build of JDK with
> invokedynamic support and it contained a class (DynamicObject?) that any
> method could be invoked on its subclasses without any compile time errors.
> Does this class still exist? I can't find it anymore in the API docs.
No. There were partial prototypes in this direction as part of JSR 292, but they were abandoned in 2009. Here is a proposal from that time frame:
Nothing like this exists or was built in any usable way.
In my opinion, Java the language is unlikely to support such a thing in the near future, since there are many reasonable alternatives.
More information about the discuss