Package com.tonic.analysis.verifier
Class Verifier
- java.lang.Object
-
- com.tonic.analysis.verifier.Verifier
-
public final class Verifier extends Object
Bytecode verifier that runs the configured structural, type, control-flow, and stack-map passes over methods, classes, or whole pools.
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static classVerifier.BuilderBuilder for aVerifier.
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description static Verifier.Builderbuilder()Creates a builder for a verifier.ClassPoolgetClassPool()VerifierConfiggetConfig()VerificationResultverify(ClassFile classFile)Verifies every method of a class, honoring the configured error mode.VerificationResultverify(MethodEntry method)Verifies a single method without an enclosing class file.VerificationResultverifyAll(ClassPool pool)Verifies every class in a pool, stopping early on the first invalid class in fail-fast mode.
-
-
-
Method Detail
-
getConfig
public VerifierConfig getConfig()
- Returns:
- the config
-
getClassPool
public ClassPool getClassPool()
- Returns:
- the class pool
-
builder
public static Verifier.Builder builder()
Creates a builder for a verifier.- Returns:
- a new builder
-
verify
public VerificationResult verify(ClassFile classFile)
Verifies every method of a class, honoring the configured error mode.- Parameters:
classFile- the class to verify- Returns:
- the combined result for the class
-
verify
public VerificationResult verify(MethodEntry method)
Verifies a single method without an enclosing class file.- Parameters:
method- the method to verify- Returns:
- the method's result
-
verifyAll
public VerificationResult verifyAll(ClassPool pool)
Verifies every class in a pool, stopping early on the first invalid class in fail-fast mode.- Parameters:
pool- the classes to verify- Returns:
- the combined result across all classes
-
-