Class JKExceptionHandlerInfo

java.lang.Object
com.jk.core.exceptions.handler.JKExceptionHandlerInfo

public class JKExceptionHandlerInfo extends Object
This class represents information about an exception handler.

This class holds details about an exception handler, including its throwable, its class and configuration.

Version:
1.0
Author:
Dr. Jalal H. Kiswani
  • Constructor Details

    • JKExceptionHandlerInfo

      public JKExceptionHandlerInfo()
      This method constructs a new JKExceptionHandlerInfo instance.
  • Method Details

    • getException

      public Throwable getException()
      This method sets the exception this exception handler is responsible for handling.
      Returns:
      the throwable this exception handler is responsible for handling.
    • getExceptionClass

      public Class<? extends Throwable> getExceptionClass()
      This method gets the exception class which this handler is responsible for handling.
      Returns:
      the throwable class.
    • getHandler

      public JKExceptionHandler getHandler()
      This method gets the exception handler.
      Returns:
      the exception handler.
    • setException

      public JKExceptionHandlerInfo setException(Throwable exception)
      This method gets a JKExceptionHandlerInfo instance and specifies the exception.
      Parameters:
      exception - Specifies the exception this exception handler is responsible for.
      Returns:
      the JKExceptionHandlerInfo instance with its exception specified.
    • setExceptionClass

      public JKExceptionHandlerInfo setExceptionClass(Class<? extends Throwable> exceptionClass)
      This method gets a JKExceptionHandlerInfo instance and specifies the exception class.
      Parameters:
      exceptionClass - Specifies the exception class.
      Returns:
      the JKExceptionHandlerInfo instance with its exception class specified.
    • setHandler

      public JKExceptionHandlerInfo setHandler(JKExceptionHandler<?> handler)
      This method gets a JKExceptionHandlerInfo instance and specifies the exception handler associated with it.
      Parameters:
      handler - Specifies the exception handler.
      Returns:
      the JKExceptionHandlerInfo instance with its exception handler specified.