MCPcopy Create free account
hub / github.com/Relph1119/JVMByPython / resolve_method_ref

Method resolve_method_ref

src/ch08/rtda/heap/CpMethodRef.py:29–48  ·  view source on GitHub ↗

如果类D想通过方法符号引用访问类C的某个方法,先要解析符号引用得到类C。 如果C是接口,则抛出IncompatibleClassChangeError异常,否则根据方法名和描述符查找方法。 如果找不到对应方法,则抛出NoSuchMethodError异常,否则检查类D是否有权限访问该方法。 如果没有,则抛出IllegalAccessError异常。 :return:

(self)

Source from the content-addressed store, hash-verified

source not stored for this graph (policy: none)

Callers 1

resolved_methodMethod · 0.95

Calls 5

lookup_methodMethod · 0.95
get_classMethod · 0.45
resolved_classMethod · 0.45
is_interfaceMethod · 0.45
is_accessible_toMethod · 0.45

Tested by

no test coverage detected