Interface TypeCheckInstruction

All Superinterfaces:
ClassfileElement, CodeElement, Instruction
All Known Implementing Classes:
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 Details

    • type

      ClassEntry type()
    • of

      static TypeCheckInstruction of(Opcode op, ClassEntry type)
      Returns a type check instruction.
      Parameters:
      op - the opcode for the specific type of type check instruction, which must be of kind Opcode.Kind.TYPE_CHECK
      type - the type against which to check or cast
      Returns:
      a type check instruction
    • of

      static TypeCheckInstruction of(Opcode op, ClassDesc type)
      Returns a type check instruction.
      Parameters:
      op - the opcode for the specific type of type check instruction, which must be of kind Opcode.Kind.TYPE_CHECK
      type - the type against which to check or cast
      Returns:
      a type check instruction