Class ValidationMessage

  • All Implemented Interfaces:
    IMessage

    public class ValidationMessage
    extends Message
    A specific message for model validation purposes.
    Author:
    Holger Eichelberger
    • Field Detail

      • ELEMENT_IS_NULL

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

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

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

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

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

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

        public static final int ILLEGAL_COMMENT
        Denotes an illegal comment.
        See Also:
        Constant Field Values
      • 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:
        Constant Field Values
      • code

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

        private java.lang.Object cause
        Stores the cause of the message.
    • Constructor Detail

      • ValidationMessage

        public ValidationMessage​(java.lang.String description,
                                 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​(java.lang.String description,
                                 Status status,
                                 java.lang.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 Detail

      • 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 java.lang.Object getCause()
        Returns the cause of this message.
        Returns:
        the cause, may be null