Combination/Inheritance of shadowing
I wonder if we could implement a good way to combine shadowing on multiple domains: A) Allowing User-Code to shadow Bytecoders' impl, so that forking Bytecoder is not necessary (sorry if this is already the case) B) Having clever shadowing, see the appended extract from #331: Essentially the OpenJDK Classes have lots of overloads which all call into the same methods. It would be awesome to only have to implement those base methods by shadowing while also combining the OpenJDK Classes. This could very well be extended by A), so that you can have OpenJDK -> ByteCoder -> UserTypes all shadowing.
There is one problem though, intentionally blocking out methods, as done in #331, there'd need some API for that (e.g. @Hide on methods, so they disappear for the linker)
Thanks in Advance!
I've implemented very basic support for the
java.loggingmodule. The logging method signatures with Exceptions are currently not supported, as Bytecoder itself does not support proper exception handling, at least only the JS backend does support exception handling.
It is not easy to make the OpenJDK classes linkable with Bytecoder, as Bytecoder is not a complete JVM, and might never be. If you want to extend the current supported functionality, you have to take a look at the T* classes. For instance java.util.logging.Logger is shadowed by TLogger.java, which is located in the Bytecoder java.logging module. If you are missing something, you have to implement it there. The Bytecoder shadow types overwrite very specific parts of the JDK to make them linkable.
Feel free to experiment a bit. Also, please file another Issue if you've got problems and need support. I'am always glad to help.
Originally posted by @mirkosertic in https://github.com/mirkosertic/Bytecoder/issues/331#issuecomment-611951524