- All Superinterfaces:
ClassfileElement,CodeElement,Instruction
- All Known Implementing Classes:
AbstractInstruction.BoundTypeCheckInstruction,AbstractInstruction.UnboundTypeCheckInstruction
public sealed interface TypeCheckInstruction
extends Instruction
permits AbstractInstruction.BoundTypeCheckInstruction, AbstractInstruction.UnboundTypeCheckInstruction
Models an
instanceof or checkcast instruction in the
code array of a Code attribute. Delivered as a CodeElement
when traversing the elements of a CodeModel.-
Method Summary
Modifier and TypeMethodDescriptionstatic TypeCheckInstructionReturns a type check instruction.static TypeCheckInstructionof(Opcode op, ClassEntry type) Returns a type check instruction.type()Methods inherited from interface org.glavo.classfile.Instruction
opcode, sizeInBytes
-
Method Details
-
type
ClassEntry type() -
of
Returns a type check instruction.- Parameters:
op- the opcode for the specific type of type check instruction, which must be of kindOpcode.Kind.TYPE_CHECKtype- the type against which to check or cast- Returns:
- a type check instruction
-
of
Returns a type check instruction.- Parameters:
op- the opcode for the specific type of type check instruction, which must be of kindOpcode.Kind.TYPE_CHECKtype- the type against which to check or cast- Returns:
- a type check instruction
-