Determine if object is of given type
Bytecode
Type | Description |
u1 | instanceof_quick opcode = 0xE1 (225) |
u2 | index |
Stack ..., objectref => ..., result
Description The objectref,
which must be of type reference
, is popped from the operand stack. The
unsigned indexbyte1 and indexbyte2 are used to construct an index into the
constant pool of the current class, where the value of the index is (indexbyte1 << 8) | indexbyte2.
The class at that index of the constant pool must have already been successfully resolved
and may be a class, array, or interface.
If objectref is not null
and is an instance of
the resolved class, array, or interface, the instanceof_quick instruction pushes an
int
result of 1 as an int on the operand stack. Otherwise, it
pushes an int
result of 0.
Notes
The opcode of this instruction was originally instanceof. The operands of the instanceof instruction are not modified.