问题描述
我现在专注于需要深入了解Java字节代码的项目。
I'm now focusing on a project requiring insight of Java byte code.
在,我现在可以完成大部分工作。我现在不清楚的一点是如何识别子类方法覆盖其基本代码? .class
文件中是否记录了与指示此重写关系的方法关联的属性,或者我应该向后转到其基类可以比较方法签名?
With the help of bcel, I can now complete most of the work. One point that I'm now not clear is how to identify a sub-class method override its base code? Is there any attribute recorded in the .class
file associated with a method indicating this overriding relationship or should I go backwards to its base class can compare method signatures?
任何提示都将受到高度赞赏。
Any hints will be highly appreciated.
推荐答案
您需要查找层次结构链 - 字节代码中没有任何内容表明它是一个重写方法,因为不需要。
You need to look up the hierarchy chain--there's nothing in the byte code that indicates it's an overridden method, because there doesn't need to be.
这篇关于如何识别Java字节码中的覆盖方法?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!