Class StructuralVerifier


  • public class StructuralVerifier
    extends Object
    Bytecode checker for the structure of a method body - code length, opcode validity, wide prefixes, operands, branch targets landing on instruction boundaries, and the last instruction not falling off the end.
    • Constructor Detail

      • StructuralVerifier

        public StructuralVerifier​(ClassFile classFile)
        Creates a verifier whose operand checks resolve pool references against a class.
        Parameters:
        classFile - the class supplying the constant pool, or null to skip pool checks
    • Method Detail

      • verify

        public void verify​(MethodEntry method,
                           ErrorCollector collector)
        Walks a method body and reports every structural fault to the collector, stopping early once the collector says to.
        Parameters:
        method - the method to verify
        collector - receives the verification errors