can API be implemented on top of reflection?
Per Bothner
per at bothner.com
Fri Jun 24 17:45:59 UTC 2022
One feature of the gnu.bytecode library (use by Kawa) is that it provides
the same API whether the information is extracted from a .class file
or from reflection. If this new library in some hypothetical future
is to replace gnu.bytecode it would be nice to preserve that functionality.
Based on a quick look at the API it seems like it should be possible to implement
a ClassModel on top of reflection. That would be desirable,
even if it's not a primary initial goal of this project. Still, it
would be nice to provide that as either part of the library itself
or as a testsuite to make sure it remains feasible.
Perhaps ultimately the new API could a suitable replacement for the
reflection API, but with the lessons of the "Mirrors" ideas in the
2004 paper (https://urldefense.com/v3/__https://bracha.org/mirrors.pdf__;!!ACWV5N9M2RV99hQ!IDvYjRq58nngngAfRsofjUK7vvaEaPCe7YoulgZOqXxMXjVzHtt9desKzRwOQSnSJCV3kYD_7gKAlshFvMXlaw$ ).
Of course these ideas are not new to Brian and his co-workers,
but I thought it worth mentioning them here.
--
--Per Bothner
per at bothner.com https://urldefense.com/v3/__http://per.bothner.com/__;!!ACWV5N9M2RV99hQ!IDvYjRq58nngngAfRsofjUK7vvaEaPCe7YoulgZOqXxMXjVzHtt9desKzRwOQSnSJCV3kYD_7gKAlsjvkYO5oQ$
More information about the classfile-api-dev
mailing list