Java Reference
In-Depth Information
• The number of parameters to the method
• A symbolic reference to the type of each parameter
A reference to a method must also include either a symbolic reference to the eras-
ure of the return type of the denoted method or an indication that the denoted
method is declared void and does not return a value.
6. Given a class instance creation expression (§ 15.9 ) or a constructor invocation
statement (§ 8.8.7.1 ) in a class or interface C referencing a constructor m declared
in a (possibly distinct) class or interface D , we define the qualifying type of the
constructor invocation as follows:
• If the expression is of the form new D (...) or X .new D (...) , then the qualifying type
of the invocation is D .
• If the expression is of the form new D (...){...} or X .new D (...){...} , then the qualify-
ing type of the expression is the compile-time type of the expression.
• If the expression is of the form super(...) or Primary .super(...) then the qualifying
type of the expression is the direct superclass of C .
• If the expression is of the form this(...) , then the qualifying type of the expression
is C .
A reference to a constructor must be resolved at compile time to a symbolic refer-
ence to the erasure (§ 4.6 ) of the qualifying type of the invocation, plus the signa-
ture of the constructor (§ 8.8.2 ) . The signature of a constructor must include both:
• The number of parameters of the constructor
• A symbolic reference to the type of each formal parameter
In addition, the constructor of a non- private inner member class must be compiled
such that it has as its first parameter, an additional implicit parameter representing
the immediately enclosing instance (§ 8.1.3 ) .
7. Any constructs introduced by a Java compiler that do not have a corresponding
construct in the source code must be marked as synthetic, except for default con-
structors, the class initialization method, and the values and valueOf methods of the
Enum class.
A binary representation for a class or interface must also contain all of the following:
1. If it is a class and is not class Object , then a symbolic reference to the erasure (§ 4.6 )
of the direct superclass of this class.
2. A symbolic reference to the erasure of each direct superinterface, if any.
Search WWH ::




Custom Search