15.11.4
Runtime Evaluation of Method Invocation
EXPRESSIONS
If the second production for
MethodInvocation
, which includes a
Primary
, is
involved, then there are two subcases:
N
If the invocation mode is
static
, then there is no target reference. The
expression
Primary
is evaluated, but the result is then discarded.
N
Otherwise, the expression
Primary
is evaluated and the result is used as the
target reference.
In either case, if the evaluation of the
Primary
 expression completes abruptly,
then no part of any argument expression appears to have been evaluated, and
the method invocation completes abruptly for the same reason.
If the third production for
MethodInvocation
, which includes the keyword
super
, is involved, then the target reference is the value of
this
.
15.11.4.2
Evaluate Arguments
The argument expressions are evaluated in order, from left to right. If the evalua 
tion of any argument expression completes abruptly, then no part of any argument
expression to its right appears to have been evaluated, and the method invocation
completes abruptly for the same reason.
15.11.4.3
Check Accessibility of Type and Method
Let
C
 be the class containing the method invocation, and let
T
 be the class or inter 
face that contained the method being invoked, and
m
 be the name of the method,
as determined at compile time ( 15.11.3).
A Java Virtual Machine must insure, as part of linkage, that the method
m
 still
exists in the type
T
. If this is not true, then a
NoSuchMethodError
 (which is a
subclass of
IncompatibleClassChangeError
) occurs. If the invocation mode is
interface
, then the virtual machine must also check that the target reference
type still implements the specified interface. If the target reference type does not
still implement the interface, then an
IncompatibleClassChangeError
 occurs.
The virtual machine must also insure, during linkage, that the type
T
 and the
method
m
 are accessible. For the type
T
:
If
T
is in the same package as
C
, then
T
 is accessible.
If
T
is in a different package than
C
, and
T
 is
public
, then
T
 is accessible.
334






footer




 

 

 

 

 Home | About Us | Network | Services | Support | FAQ | Control Panel | Order Online | Sitemap | Contact

java hosting

 

Our partners: PHP: Hypertext Preprocessor Best Web Hosting Java Web Hosting Inexpensive Web Hosting  Jsp Web Hosting

Cheapest Web Hosting Jsp Hosting Cheap Hosting

Visionwebhosting.net Business web hosting division of Web Design Plus. All rights reserved