Class SeverityAndIssue

java.lang.Object
de.uka.ipd.sdq.errorhandling.SeverityAndIssue
All Implemented Interfaces:
Comparable<SeverityAndIssue>

public class SeverityAndIssue extends Object implements Comparable<SeverityAndIssue>
Issue combined with a severity level. Used to record and report issues to the user using the IssuesDialog.
  • Constructor Details

    • SeverityAndIssue

      public SeverityAndIssue(SeverityEnum error, String message, EObject element)
      Create a new instance.
      Parameters:
      error - Severity of the issue.
      message - Description of the issue.
      element - Element causing the issue (if applicable).
    • SeverityAndIssue

      public SeverityAndIssue(SeverityEnum error, String message, Object element, String objectResourceName)
      Create a new instance.
      Parameters:
      error - Severity of the issue.
      message - Description of the issue.
      element - Element causing the issue (if applicable).
      objectResourceName - Name of the resource containing the object (if the element is not an EObject).
  • Method Details

    • getMessage

      public String getMessage()
      Returns:
      The issue message.
    • getDetails

      public String getDetails()
      Returns:
      Details on the issue's message.
    • getElement

      public Object getElement()
      May be null.
      Returns:
      The Object or null.
    • getResourceName

      public String getResourceName()
      Return the resource name or an empty String if this SeverityAndIssue has no element.
      Returns:
    • getError

      public SeverityEnum getError()
    • compareTo

      public int compareTo(SeverityAndIssue o)
      Specified by:
      compareTo in interface Comparable<SeverityAndIssue>