- 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.- Since:
- 22
-
Method Summary
Modifier and TypeMethodDescriptionstatic TypeCheckInstructionReturns a type check instruction.static TypeCheckInstructionof(Opcode op, ClassEntry type) Returns a type check instruction.type()Returns the type against which the instruction checks or casts.Methods inherited from interface org.glavo.classfile.Instruction
opcode, sizeInBytes
-
Method Details
-
type
ClassEntry type()Returns the type against which the instruction checks or casts.- Returns:
- the type against which the instruction checks or casts
-
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
-