⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 methodref.java

📁 java 到c的转换程序的原代码.对喜欢C程序而不懂JAVA程序的人很有帮助
💻 JAVA
字号:
//  MethodRef.java -- a Method or InterfaceMeth ref in a Constant tablepackage toba.classfile;public class MethodRef extends FieldRef {    public MethodRef(ClassRef cl, String n, String s) { super(cl, n, s); }    // Locate the method that this reference refers    // to in the given ClassData    protected Field findMethod(ClassData cdata) {        Field rm;        Field [] mt;        int i;        /* This method is wrong in exactly the same way as VariableRef's         * findVariable.  It may return the wrong reference if a class         * has a static and instance method of the same name (due to         * overloading). */        /* Give static methods priority; one of them has to come first.... */        mt = cdata.smtable;        i = mt.length;        while (0 <= --i) {	    if ((name == mt[i].name) && 		(signature == mt[i].signature)) {		return mt[i];            }	}        /* If no static method found, look through the dynamic table. */	mt = cdata.imtable;        i = mt.length;        while (0 <= --i) {	    if ((name == mt[i].name) && 		(signature == mt[i].signature)) {		return mt[i];            }	}        /* Blow chow. */	throw new NoSuchMethodError(cdata.name + "." + name + signature);    }    public void resolveWith(ClassData cdata) {	resolveTo(findMethod(cdata));    }};

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -