Class AbstractReport

    • Constructor Summary

      Constructors 
      Constructor Description
      AbstractReport()
      Default constructor with empty message.
      AbstractReport​(java.lang.String message)
      Constructor.
      AbstractReport​(java.lang.String message, int severity)
      Constructor.
      AbstractReport​(java.lang.String message, int severity, java.lang.Object... arguments)
      Constructor with MessageFormat support.
      AbstractReport​(java.lang.String message, java.lang.Object... arguments)
      Constructor with MessageFormat support.
      AbstractReport​(java.lang.Throwable exception)
      Constructor.
      AbstractReport​(java.lang.Throwable exception, int severity)
      Constructor.
      AbstractReport​(java.lang.Throwable exception, java.lang.String message)
      Constructor.
      AbstractReport​(java.lang.Throwable exception, java.lang.String message, java.lang.Object... arguments)
      Constructor with MessageFormat support.
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      java.lang.Throwable getException()
      Returns the exception this report is based on, if any.
      java.lang.String getMessage()
      Returns the report message.
      int getSeverity()
      Returns the status of this report.
      boolean hasException()
      Whether this report is based upon an exception.
      protected void setException​(java.lang.Throwable exception)
      Sets the exception this report is based on.
      protected void setMessage​(java.lang.String message)
      Sets the report' message.
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Constructor Detail

      • AbstractReport

        public AbstractReport()
        Default constructor with empty message. Sets the severity to IStatus.ERROR.
      • AbstractReport

        public AbstractReport​(java.lang.Throwable exception)
        Constructor. Sets the severity to IStatus.ERROR.
        Parameters:
        exception - the exception this report is based on
      • AbstractReport

        public AbstractReport​(java.lang.String message)
        Constructor. Sets the severity to IStatus.ERROR.
        Parameters:
        message - the report message
      • AbstractReport

        public AbstractReport​(java.lang.String message,
                              java.lang.Object... arguments)
        Constructor with MessageFormat support. Sets the severity to IStatus.ERROR.
        Parameters:
        message - the report message
        arguments - the arguments for the message
        Since:
        1.14
      • AbstractReport

        public AbstractReport​(java.lang.String message,
                              int severity)
        Constructor. Sets the severity to the given severity.
        Parameters:
        message - the report message
        severity - the severity of the report specified as an IStatus severity code.
      • AbstractReport

        public AbstractReport​(java.lang.String message,
                              int severity,
                              java.lang.Object... arguments)
        Constructor with MessageFormat support.
        Parameters:
        message - the report message
        severity - the message severity
        arguments - the arguments for the message
        Since:
        1.14
      • AbstractReport

        public AbstractReport​(java.lang.Throwable exception,
                              java.lang.String message)
        Constructor. Sets the severity to IStatus.ERROR.
        Parameters:
        exception - the exception this report is based on
        message - the report message
      • AbstractReport

        public AbstractReport​(java.lang.Throwable exception,
                              java.lang.String message,
                              java.lang.Object... arguments)
        Constructor with MessageFormat support.
        Parameters:
        exception - the exception this report is based on
        message - the report message
        arguments - the arguments for the message
        Since:
        1.14
      • AbstractReport

        public AbstractReport​(java.lang.Throwable exception,
                              int severity)
        Constructor.
        Parameters:
        exception - the exception this report is based on
        severity - the severity of the report
    • Method Detail

      • getMessage

        public java.lang.String getMessage()
        Returns the report message.
        Returns:
        the report message
      • hasException

        public boolean hasException()
        Whether this report is based upon an exception.
        Returns:
        true, if this report is based upon an exception, false otherwise
      • getException

        public java.lang.Throwable getException()
        Returns the exception this report is based on, if any.
        Returns:
        the exception this report is based on, if any, otherwise null
        See Also:
        hasException()
      • getSeverity

        public int getSeverity()
        Returns the status of this report.
        Returns:
        the status of this report
      • setException

        protected void setException​(java.lang.Throwable exception)
        Sets the exception this report is based on.
        Parameters:
        exception - the exception this report is based on
        See Also:
        hasException()
      • setMessage

        protected void setMessage​(java.lang.String message)
        Sets the report' message.
        Parameters:
        message - the report message to set