Class ExceptionHook.Builder

    • Constructor Detail

      • Builder

        public Builder()
    • Method Detail

      • hookDescriptor

        public ExceptionHook.Builder hookDescriptor​(HookDescriptor hookDescriptor)
        Sets the hook method invoked in each instrumented exception handler.
        Parameters:
        hookDescriptor - the hook method descriptor
        Returns:
        this builder
      • enabled

        public ExceptionHook.Builder enabled​(boolean enabled)
        Sets whether the hook is active.
        Parameters:
        enabled - true to enable the hook
        Returns:
        this builder
      • priority

        public ExceptionHook.Builder priority​(int priority)
        Sets the ordering priority relative to other hooks.
        Parameters:
        priority - the priority value
        Returns:
        this builder
      • exceptionType

        public ExceptionHook.Builder exceptionType​(String exceptionType)
        Sets the exception type to intercept; null intercepts all types.
        Parameters:
        exceptionType - the exception type (internal name)
        Returns:
        this builder
      • passException

        public ExceptionHook.Builder passException​(boolean passException)
        Sets whether the exception object is passed to the hook.
        Parameters:
        passException - true to pass the exception
        Returns:
        this builder
      • passMethodName

        public ExceptionHook.Builder passMethodName​(boolean passMethodName)
        Sets whether the enclosing method name is passed to the hook.
        Parameters:
        passMethodName - true to pass the method name
        Returns:
        this builder
      • passClassName

        public ExceptionHook.Builder passClassName​(boolean passClassName)
        Sets whether the enclosing class name is passed to the hook.
        Parameters:
        passClassName - true to pass the class name
        Returns:
        this builder
      • canSuppress

        public ExceptionHook.Builder canSuppress​(boolean canSuppress)
        Sets whether the hook can suppress the exception by returning true.
        Parameters:
        canSuppress - true to let the hook suppress the exception
        Returns:
        this builder
      • build

        public ExceptionHook build()
        Builds the configured exception hook.
        Returns:
        the new hook