Class 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.
    • Method Detail

      • 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