Class OperandValidator
- java.lang.Object
-
- com.tonic.analysis.verifier.structural.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 Summary
Constructors Constructor Description OperandValidator(ConstPool constPool)Creates a validator bound to the pool that operands are resolved against.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description voidvalidate(int opcode, int offset, byte[] bytecode, ErrorCollector collector)Checks the constant pool operand of one instruction, reporting any mismatch to the collector.
-
-
-
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 offsetoffset- the bytecode offset of the opcodebytecode- the method's code arraycollector- receives the verification errors found
-
-