Java Reference
In-Depth Information
• The binary name of a type variable declared by a generic class or interface
by $, followed by the simple name of the type variable.
binary name of the type declaring the method, followed by $, followed by the
descriptor of the method as defined in
The Java Virtual Machine Specification,
Java SE 7 Edition
, followed by $, followed by the simple name of the type vari-
able.
the binary name of the type declaring the constructor, followed by $, followed
by the descriptor of the constructor as defined in
The Java Virtual Machine
Specification, Java SE 7 Edition
, followed by $, followed by the simple name
of the type variable.
2.
A reference to another class or interface type must be symbolic, using the binary
name of the type.
time to the constant value that is denoted. No reference to such a field should be
present in the code in a binary file (except in the class or interface containing the
field, which will have code to initialize it). Such a field must always appear to
must never be observed. See §
13.4.9
for a discussion.
4.
Given a legal expression denoting a field access in a class
C
, referencing a non-
D
, we define the
qualifying type of the field reference
as follows:
• If the expression is of the form
Primary
.
f
then:
V
n
, then the qualifying type of the reference is
V
1
.
♦ Otherwise, the compile-time type of
Primary
is the qualifying type of the
reference.
• If the expression is of the form
super.
f
then the superclass of
C
is the qualifying
type of the reference.
• If the expression is of the form
X
.super.
f
then the superclass of
X
is the qualify-
ing type of the reference.
• If the reference is of the form
X
.
f
, where
X
denotes a class or interface, then the
class or interface denoted by
X
is the qualifying type of the reference.