简体   繁体   English

this = this in反编译Java

[英]this = this in decompiled Java

I tried decompiling a Java application to which I do not have the source code and a strange thing showed up. 我尝试反编译一个我没有源代码的Java应用程序,但出现了奇怪的事情。 At the top of the constructor for a class, there is a line that says 在类的构造函数的顶部,有一行显示

this = this

What does this (not this ) mean? (不是this )是什么意思? Is this just an artifact of the decompilation process? 这仅仅是反编译过程的产物吗? Or is it just some ugly hack? 还是仅仅是一些丑陋的骇客? Can this be assigned to something else? 能分配给其他的东西? If so, what does 如果是这样,怎么办

this = null

mean? 意思?

this is final. this是最终的。 You definitely cannot assign it. 您绝对不能分配它。 I'd guess this is a disassembler artifact. 我猜这是一个反汇编工件。

There's some potential goofy-ness with inner classes (which hold this pointers to the outer class), but those lines as written are not valid Java. 这里也有一些潜在的愚蠢的烦躁与内部类(持有this指针指向外部类),但这些行书面不是有效的Java。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM