Sponsored Link •
|
Advertisement
|
CONSTANT_InterfaceMethodref_info
EntriesTo resolve a constant pool entry of type
CONSTANT_InterfaceMethodref_info
, the virtual machine must first resolve
the CONSTANT_Class_info
entry specified in the
class_index
item. Therefore, any error that can be thrown because of the resolution
of a CONSTANT_Class_info
can be thrown during the resolution of a
CONSTANT_InterfaceMethodref_info
. If the resolution of the
CONSTANT_Class_info
entry succeeds, the virtual machine searches for the
indicated method in the interface and its supertypes. (The virtual machine need not check to make sure the
current class has permission to access the method, because all methods declared in interfaces are implicitly
public.)
If resolution to the CONSTANT_Class_info
completes successfully, the virtual
machine performs interface method resolution using these steps:
IncompatibleClassChangeError
.
java.lang.Object
for a method of the
specified name and descriptor. If the virtual machine discovers such a method, that method is the result of
the successful interface method lookup.
If the virtual machine discovers there is no method with the proper name, return type, and number and
types of parameters in the referenced interface or any of its supertypes, the virtual machine throws
NoSuchMethodError
.
Otherwise, the virtual machine marks the entry as resolved and places a direct reference to the method in the data for the constant pool entry.
Sponsored Links
|