13.2
What Binary Compatibility Is and Is Not
BINARY COMPATIBILITY
A specification of each field that is not
private
declared in the class or inter
face, given as the simple name of the field and a symbolic reference to the
type of the field
If it is a class, then the signature of each constructor, as described above
For each method that is not
private
declared in the class or interface, its sig
nature and return type, as described above
The code needed to implement the class or interface:
N
For an interface, code for the field initializers
N
For a class, code for the field initializers, the static initializers, and the
implementation of each method or constructor that is not declared
private
If a Java system defines a binary format that represents a group of classes and
interfaces comprised by an entire package, then this binary format need not
expose information about fields, methods, or constructors that are declared with
default (package) access.
The following sections specify the changes that may be made to class and
interface type declarations without breaking compatibility with pre existing bina
ries. The Java Virtual Machine and its standard
class
file format support these
changes; other Java binary formats are required to support these changes as well.
13.2 What Binary Compatibility Is and Is Not
A change to a type is
binary compatible with
(equivalently, does not
break binary
compatibility
with) preexisting binaries if preexisting binaries that previously
linked without error will continue to link without error.
As described in 13.1, symbolic references to methods and fields name the
exact class or interface in which the method or field is declared. This means that
binaries are compiled to rely on the accessible members and constructors of other
classes and interfaces. To preserve binary compatibility, a class or interface should
treat these accessible members and constructors, their existence and behavior, as a
contract
with users of the class or interface.
Java is designed to prevent additions to contracts and accidental name colli
sions from breaking binary compatibility; specifically:
240
footer
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