Class StructuralVerifier
- java.lang.Object
-
- com.tonic.analysis.verifier.structural.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 Summary
Constructors Constructor Description StructuralVerifier(ClassFile classFile)Creates a verifier whose operand checks resolve pool references against a class.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description voidverify(MethodEntry method, ErrorCollector collector)Walks a method body and reports every structural fault to the collector, stopping early once the collector says to.
-
-
-
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 verifycollector- receives the verification errors
-
-