Class OperandValidator


  • public class OperandValidator
    extends Object
    Verifier pass that checks each instruction's constant pool operand points at an entry of the kind the opcode requires.
    • Constructor Detail

      • OperandValidator

        public OperandValidator​(ConstPool constPool)
        Creates a validator bound to the pool that operands are resolved against.
        Parameters:
        constPool - the constant pool of the class being verified
    • Method Detail

      • validate

        public void validate​(int opcode,
                             int offset,
                             byte[] bytecode,
                             ErrorCollector collector)
        Checks the constant pool operand of one instruction, reporting any mismatch to the collector.
        Parameters:
        opcode - the opcode at the offset
        offset - the bytecode offset of the opcode
        bytecode - the method's code array
        collector - receives the verification errors found