📄 java3.txt
字号:
MemoryImageSource An image producer that gets its image
from memory; used after constructing
an image by hand
PixelGrabber An ImageConsumer that retrieves a
subset of the pixels in an image
RGBImageFilter Abstract behavior for a filter that
modifies the RGB values of pixels in
RGB images
java.awt.peer
The java.awt.peer package is a subpackage of awt that provides
the (hidden) platform-specific awt classes (for example, for
Motif, Macintosh, or Windows 95) with platform-independent
interfaces to implement. Thus, callers using these interfaces
need not know which platform's window system these hidden awt
classes are currently implementing.
Each class in the awt that inherits from either Component or
MenuComponent has a corresponding peer class. Each of those
classes is the name of the Component with -Peer added (for
example, ButtonPeer, DialogPeer, and WindowPeer). Because each
one provides similar behavior, they are not enumerated here.
java.applet
The java.applet package provides applet-specific behavior.
Interfaces
AppletContext Methods to refer to the applet's context
AppletStub Methods for implementing applet viewers
AudioClip Methods for playing audio files
Classes
Applet The base applet class
----------
appendix D
Bytecodes Reference
CONTENTS
* The _quick Bytecodes
Let's look at a (progressively less and less) detailed
description of each class of bytecodes.
For each bytecode, some brief text describes its function and a
textual "picture" of the stack, both before and after the
bytecode has been executed, is shown. This text picture will
look like the following:
..., value1, value2 => ..., value3
This means that the bytecode expects two operands-value1 and
value2-to be on the top of the stack, pops them both off the
stack, operates on them to produce value3, and pushes value3
back onto the top of the stack. You should read each stack from
right to left, with the rightmost value being the top of the
stack. The ... is read as "the rest of the stack below," which
is irrelevant to the current bytecode. All operands on the stack
are 32 bits wide.
Because most bytecodes take their arguments from the stack and
place their results back there, the brief text descriptions that
follow only say something about the source or destination of
values if they are not on the stack. For example, the
description "Load integer from local variable." means that the
integer is loaded onto the stack, and "Integer add." intends its
integers to be taken from-and the result returned to-the stack.
Bytecodes that don't affect control flow simply move the pc onto
the next bytecode that follows in sequence. Those that do affect
the pc say so explicitly. Whenever you see byte1, byte2, and so
forth, it refers to the first byte, second byte, and so on, that
follow the opcode byte itself. After such a bytecode is
executed, the pc automatically advances over these operand bytes
to start the next bytecode in sequence.
Note
The next few sections are in "reference manual style,"
presenting each bytecode separately in all its (often
redundant) detail; each bytecode is presented as an
operation followed by an explanation. Later sections begin
to collapse and coalesce this verbose style into something
shorter and more readable. The verbose form is shown at
first because the online reference manuals will look more
like it, and because it drives home the point that each
bytecode "function" comes in many, nearly identical
bytecodes, one for each primitive type in Java.
Pushing Constants onto the Stack
bipush ... => ..., value
Push 1-byte signed integer. byte1 is interpreted as a signed
8-bit value. This value is expanded to an int and pushed onto
the operand stack.
sipush ... => ..., value
Push 2-byte signed integer. byte1 and byte2 are assembled into a
signed 16-bit value. This value is expanded to an int and pushed
onto the operand stack.
ldc1 ... => ..., item
Push item from constant pool. byte1 is used as an unsigned 8-bit
index into the constant pool of the current class. The item at
that index is resolved and pushed onto the stack.
ldc2 ... => ..., item
Push item from constant pool. byte1 and byte2 are used to
construct an unsigned 16-bit index into the constant pool of the
current class. The item at that index is resolved and pushed
onto the stack.
ldc2w ... => ..., constant-word1, constant-word2
Push long or double from constant pool. byte1 and byte2 are used
to construct an unsigned 16-bit index into the constant pool of
the current class. The two-word constant at that index is
resolved and pushed onto the stack.
aconst_null ... => ..., null
Push the null object reference onto the stack.
iconst_m1 ... => ..., -1
Push the int -1 onto the stack.
iconst_<I> ... => ..., <I>
Push the int <I> onto the stack. There are six of these
bytecodes, one for each of the integers 0-5: iconst_0, iconst_1,
iconst_2, iconst_3, iconst_4, and iconst_5.
lconst_<L> ... => ..., <L>-word1, <L>-word2
Push the long <L> onto the stack. There are two of these
bytecodes, one for each of the integers 0 and 1: lconst_0 and
lconst_1.
fconst_<F> ... => ..., <F>
Push the float <F> onto the stack. There are three of these
bytecodes, one for each of the integers 0-2: fconst_0, fconst_1,
and fconst_2.
dconst_<D> ... => ..., <D>-word1, <D>-word2
Push the double <D> onto the stack. There are two of these
bytecodes, one for each of the integers 0 and 1: dconst_0, and
dconst_1.
Loading Local Variables onto the Stack
iload ... => ..., value
Load int from local variable. Local variable byte1 in the
current Java frame must contain an int. The value of that
variable is pushed onto the operand stack.
iload_<I> ... => ..., value
Load int from local variable. Local variable <I> in the current
Java frame must contain an int. The value of that variable is
pushed onto the operand stack. There are four of these
bytecodes, one for each of the integers 0-3: iload_0, iload_1,
iload_2, and iload_3.
lload ... => ..., value-word1, value-word2
Load long from local variable. Local variables byte1 and byte1 +
1 in the current Java frame must together contain a long
integer. The values contained in those variables are pushed onto
the operand stack.
lload_<L> ... => ..., value-word1, value-word2
Load long from local variable. Local variables <L> and <L> + 1
in the current Java frame must together contain a long integer.
The value contained in those variables is pushed onto the
operand stack. There are four of these bytecodes, one for each
of the integers 0-3: lload_0, lload_1, lload_2, and lload_3.
fload ... => ..., value
Load float from local variable. Local variable byte1 in the
current Java frame must contain a single-precision
floating-point number. The value of that variable is pushed onto
the operand stack.
fload_<F> ... => ..., value
Load float from local variable. Local variable <F> in the
current Java frame must contain a single-precision
floating-point number. The value of that variable is pushed onto
the operand stack. There are four of these bytecodes, one for
each of the integers 0-3: fload_0, fload_1, fload_2, and
fload_3.
dload ... => ..., value-word1, value-word2
Load double from local variable. Local variables byte1 and byte1
+ 1 in the current Java frame must together contain a
double-precision floating-point number. The value contained in
those variables is pushed onto the operand stack.
dload_<D> ... => ..., value-word1, value-word2
Load double from local variable. Local variables <D> and <D> + 1
in the current Java frame must together contain a
double-precision floating-point number. The value contained in
those variables is pushed onto the operand stack. There are four
of these bytecodes, one for each of the integers 0-3: dload_0,
dload1, dload_2, and dload_3.
aload ... => ..., value
Load object reference from local variable. Local variable byte1
in the current Java frame must contain a return address or
reference to an object or array. The value of that variable is
pushed onto the operand stack.
aload_<A> ... => ..., value
Load object reference from local variable. Local variable <A> in
the current Java frame must contain a return address or
reference to an object. The value of that variable is pushed
onto the operand stack. There are four of these bytecodes, one
for each of the integers 0-3: aload_0, aload_1, aload_2, and
aload_3.
Storing Stack Values into Local Variables
istore
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -