Class ValidationMessage

java.lang.Object
net.ssehub.easy.basics.messages.Message
net.ssehub.easy.varModel.validation.ValidationMessage
All Implemented Interfaces:
net.ssehub.easy.basics.messages.IMessage

public class ValidationMessage extends net.ssehub.easy.basics.messages.Message
A specific message for model validation purposes.
Author:
Holger Eichelberger
  • Field Summary

    Fields
    Modifier and Type
    Field
    Description
    private Object
    Stores the cause of the message.
    private int
    Stores the type of the message (see constants above).
    static final int
    Denotes the case that contained element (reference) is null.
    static final int
    Denotes an illegal comment.
    static final int
    Denotes the case that an identifier is invalid (see IvmlIdentifierCheck).
    static final int
    Denotes the case that a parent reference is invalid, e.g., null.
    static final int
    Denotes a generic null pointer which shall not be present.
    static final int
    Denotes a missing CustomDatatype of an AbstractVariable.
    static final int
    Denotes the case that an expression is missing.
    static final int
    Denotes the case that a type reference is null.
    static final int
    Denotes the case that a slot in a compound is used but not declared.
    static final int
    Denotes that an annotation is pointing to an element, which was not annotated by this annotation.
    static final int
    Denotes a missing/unspecified operation used inside an OCLFeatureCall.
  • Constructor Summary

    Constructors
    Constructor
    Description
    ValidationMessage(String description, net.ssehub.easy.basics.messages.Status status, int code)
    Creates a validation message (without a model element as cause).
    ValidationMessage(String description, net.ssehub.easy.basics.messages.Status status, Object cause, int code)
    Creates a validation message.
  • Method Summary

    Modifier and Type
    Method
    Description
    Returns the cause of this message.
    int
    Returns the code of this message.

    Methods inherited from class net.ssehub.easy.basics.messages.Message

    containsError, getDescription, getDetailedDescription, getStatus, toString

    Methods inherited from class java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
  • Field Details

    • ELEMENT_IS_NULL

      public static final int ELEMENT_IS_NULL
      Denotes the case that contained element (reference) is null.
      See Also:
    • INVALID_IDENTIFIER

      public static final int INVALID_IDENTIFIER
      Denotes the case that an identifier is invalid (see IvmlIdentifierCheck).
      See Also:
    • TYPE_IS_NULL

      public static final int TYPE_IS_NULL
      Denotes the case that a type reference is null.
      See Also:
    • INVALID_PARENT

      public static final int INVALID_PARENT
      Denotes the case that a parent reference is invalid, e.g., null.
      See Also:
    • UNDECLARED_SLOT

      public static final int UNDECLARED_SLOT
      Denotes the case that a slot in a compound is used but not declared.
      See Also:
    • MISSING_EXPRESSION

      public static final int MISSING_EXPRESSION
      Denotes the case that an expression is missing.
      See Also:
    • IS_NULL

      public static final int IS_NULL
      Denotes a generic null pointer which shall not be present.
      See Also:
    • ILLEGAL_COMMENT

      public static final int ILLEGAL_COMMENT
      Denotes an illegal comment.
      See Also:
    • MISSING_CUSTOM_DATATYPE

      public static final int MISSING_CUSTOM_DATATYPE
      Denotes a missing CustomDatatype of an AbstractVariable.
      See Also:
    • UNRESOLVED_OPERATION

      public static final int UNRESOLVED_OPERATION
      Denotes a missing/unspecified operation used inside an OCLFeatureCall. The operation was not resolved, probably because OCLFeatureCall.inferDatatype() was not called.
      See Also:
    • UNRESOLVED_ANNOTATION

      public static final int UNRESOLVED_ANNOTATION
      Denotes that an annotation is pointing to an element, which was not annotated by this annotation.
      See Also:
    • code

      private int code
      Stores the type of the message (see constants above).
    • cause

      private Object cause
      Stores the cause of the message.
  • Constructor Details

    • ValidationMessage

      public ValidationMessage(String description, net.ssehub.easy.basics.messages.Status status, int code)
      Creates a validation message (without a model element as cause).
      Parameters:
      description - the message description
      status - the status of the message
      code - an optional code identifying the specific kind of message typically used while automated testing (use constants defined in this class)
    • ValidationMessage

      public ValidationMessage(String description, net.ssehub.easy.basics.messages.Status status, Object cause, int code)
      Creates a validation message.
      Parameters:
      description - the message description
      status - the status of the message
      cause - the element which caused the message (may be null)
      code - an optional code identifying the specific kind of message typically used while automated testing (use constants defined in this class)
  • Method Details

    • getCode

      public int getCode()
      Returns the code of this message.
      Returns:
      the code identifying the kind of message, see constants in this class
    • getCause

      public Object getCause()
      Returns the cause of this message.
      Returns:
      the cause, may be null