It's possible in Java to access the source code of a method “reflectively”?

前端 未结 3 1313
萌比男神i
萌比男神i 2021-01-17 12:27

I\'m afraid that the answer is no, but maybe one of you surprises me.

Thanks.

Edit 1: I\'m aware that the question doesn\'t make much sens

3条回答
  •  野的像风
    2021-01-17 13:15

    I don't think so. When the .java is compiled it becomes a .class; as far as I know Java doesn't have a built-in decompiler to turn that .class back into a .java. All that a runnable application knows about is .class files.

提交回复
热议问题