10.12.2012 Views

The Java Language Specification, Third Edition

The Java Language Specification, Third Edition

The Java Language Specification, Third Edition

SHOW MORE
SHOW LESS

You also want an ePaper? Increase the reach of your titles

YUMPU automatically turns print PDFs into web optimized ePapers that Google loves.

13.1 <strong>The</strong> Form of a Binary BINARY COMPATIBILITY<br />

338<br />

◆ If the expression is of the form this(...), then the qualifying type of the<br />

expression is C.<br />

A reference to a constructor must be resolved at compile time to a symbolic<br />

reference to the erasure (§4.6) of the qualifying type of the invocation, plus<br />

the signature of the constructor (§8.8.2). <strong>The</strong> signature of a constructor must<br />

include both:<br />

◆ <strong>The</strong> number of parameters to the constructor<br />

◆ A symbolic reference to the type of each parameter<br />

In addition the constructor of a non-private inner member class must be compiled<br />

such that it has as its first parameter, an additional implicit parameter<br />

representing the immediately enclosing instance (§8.1.3).<br />

• Any constructs introduced by the compiler that do not have a corresponding<br />

construct in the source code must be marked as synthetic, except for default<br />

constructors and the class initialization method.<br />

A binary representation for a class or interface must also contain all of the following:<br />

• If it is a class and is not class Object, then a symbolic reference to the erasure<br />

of the direct superclass of this class<br />

• A symbolic reference to the erasure of each direct superinterface, if any<br />

• A specification of each field declared in the class or interface, given as the<br />

simple name of the field and a symbolic reference to the erasure of the type of<br />

the field<br />

• If it is a class, then the erased signature of each constructor, as described<br />

above<br />

• For each method declared in the class or interface, its erased signature and<br />

return type, as described above<br />

• <strong>The</strong> code needed to implement the class or interface:<br />

DRAFT<br />

◆ For an interface, code for the field initializers<br />

◆ For a class, code for the field initializers, the instance and static initializers,<br />

and the implementation of each method or constructor<br />

• Every type must contain sufficient information to recover its canonical name<br />

(§6.7).

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!