Class VerifierConfig.Builder

  • Enclosing class:
    VerifierConfig

    public static final class VerifierConfig.Builder
    extends Object
    Builder for a VerifierConfig; all passes default to enabled with COLLECT_ALL and 100 errors.
    • Constructor Detail

      • Builder

        public Builder()
    • Method Detail

      • collectAll

        public VerifierConfig.Builder collectAll()
        Selects COLLECT_ALL error mode.
        Returns:
        this builder
      • verifyStackMapTable

        public VerifierConfig.Builder verifyStackMapTable​(boolean verify)
        Enables or disables the StackMapTable comparison pass.
        Parameters:
        verify - true to run the pass
        Returns:
        this builder
      • strictTypeChecking

        public VerifierConfig.Builder strictTypeChecking​(boolean strict)
        Enables or disables the type-checking pass.
        Parameters:
        strict - true to run the pass
        Returns:
        this builder
      • verifyControlFlow

        public VerifierConfig.Builder verifyControlFlow​(boolean verify)
        Enables or disables the control-flow and exception-table pass.
        Parameters:
        verify - true to run the pass
        Returns:
        this builder
      • verifyStructure

        public VerifierConfig.Builder verifyStructure​(boolean verify)
        Enables or disables the structural (opcode/operand) pass.
        Parameters:
        verify - true to run the pass
        Returns:
        this builder
      • maxErrors

        public VerifierConfig.Builder maxErrors​(int max)
        Caps how many errors are collected, clamped to at least 1.
        Parameters:
        max - the error cap
        Returns:
        this builder
      • treatWarningsAsErrors

        public VerifierConfig.Builder treatWarningsAsErrors​(boolean treat)
        Controls whether warnings should be treated as verification errors.
        Parameters:
        treat - true to escalate warnings
        Returns:
        this builder
      • build

        public VerifierConfig build()
        Builds the immutable configuration.
        Returns:
        the configuration