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
FieldsModifier and TypeFieldDescriptionprivate ObjectStores the cause of the message.private intStores the type of the message (see constants above).static final intDenotes the case that contained element (reference) is null.static final intDenotes an illegal comment.static final intDenotes the case that an identifier is invalid (seeIvmlIdentifierCheck).static final intDenotes the case that a parent reference is invalid, e.g., null.static final intDenotes a generic null pointer which shall not be present.static final intDenotes a missingCustomDatatypeof anAbstractVariable.static final intDenotes the case that an expression is missing.static final intDenotes the case that a type reference is null.static final intDenotes the case that a slot in a compound is used but not declared.static final intDenotes that an annotation is pointing to an element, which was not annotated by this annotation.static final intDenotes a missing/unspecified operation used inside anOCLFeatureCall. -
Constructor Summary
ConstructorsConstructorDescriptionValidationMessage(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
Methods inherited from class net.ssehub.easy.basics.messages.Message
containsError, getDescription, getDetailedDescription, getStatus, toString
-
Field Details
-
ELEMENT_IS_NULL
public static final int ELEMENT_IS_NULLDenotes the case that contained element (reference) is null.- See Also:
-
INVALID_IDENTIFIER
public static final int INVALID_IDENTIFIERDenotes the case that an identifier is invalid (seeIvmlIdentifierCheck).- See Also:
-
TYPE_IS_NULL
public static final int TYPE_IS_NULLDenotes the case that a type reference is null.- See Also:
-
INVALID_PARENT
public static final int INVALID_PARENTDenotes the case that a parent reference is invalid, e.g., null.- See Also:
-
UNDECLARED_SLOT
public static final int UNDECLARED_SLOTDenotes the case that a slot in a compound is used but not declared.- See Also:
-
MISSING_EXPRESSION
public static final int MISSING_EXPRESSIONDenotes the case that an expression is missing.- See Also:
-
IS_NULL
public static final int IS_NULLDenotes a generic null pointer which shall not be present.- See Also:
-
ILLEGAL_COMMENT
public static final int ILLEGAL_COMMENTDenotes an illegal comment.- See Also:
-
MISSING_CUSTOM_DATATYPE
public static final int MISSING_CUSTOM_DATATYPEDenotes a missingCustomDatatypeof anAbstractVariable.- See Also:
-
UNRESOLVED_OPERATION
public static final int UNRESOLVED_OPERATIONDenotes a missing/unspecified operation used inside anOCLFeatureCall. The operation was not resolved, probably becauseOCLFeatureCall.inferDatatype()was not called.- See Also:
-
UNRESOLVED_ANNOTATION
public static final int UNRESOLVED_ANNOTATIONDenotes that an annotation is pointing to an element, which was not annotated by this annotation.- See Also:
-
code
private int codeStores the type of the message (see constants above). -
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 descriptionstatus- the status of the messagecode- 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 descriptionstatus- the status of the messagecause- 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
Returns the cause of this message.- Returns:
- the cause, may be null
-