Provide api for accessing bytecode from java.lang.reflect.Method. (original) (raw)
Сергей Чаулин cossack5 at mail.ru
Fri Aug 31 17:16:53 UTC 2018
- Previous message: JEP proposed to target JDK 12: 326: Raw String Literals (Preview)
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
Hi,
In .NET we can retrieve bytecode array from reflected class, e.g.:
MethodInfo mi = typeof (Example).GetMethod( "MethodBodyExample" ); MethodBody mb = mi.GetMethodBody(); var bytes= mb.GetILAsByteArray();
How about having something like this in java ? Leveraging this, it would be possible to get bytecode of currently loaded classes (including lambdas), killing the need to load class as a resource.
С уважением, Сергей Чаулин
- Previous message: JEP proposed to target JDK 12: 326: Raw String Literals (Preview)
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]