Package net.ssehub.easy.basics.messages
Class Message
java.lang.Object
net.ssehub.easy.basics.messages.Message
- All Implemented Interfaces:
IMessage
Defines a message to be emitted during runtime.
- Author:
- Holger Eichelberger
-
Field Summary
Fields -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionstatic booleancontainsError(List<Message> messages) Utility method returning whether there is an error message in the givenmessages.Returns the message description.Returns a detailed message description (if available) orIMessage.getDescription().Returns the status of this message.static StringUtility method returning a string representation of a given set ofmessages.
-
Field Details
-
description
-
status
-
-
Constructor Details
-
Message
Creates a message.- Parameters:
description- the message descriptionstatus- the status of the message
-
-
Method Details
-
getDescription
Description copied from interface:IMessageReturns the message description.- Specified by:
getDescriptionin interfaceIMessage- Returns:
- the message description
-
getDetailedDescription
Description copied from interface:IMessageReturns a detailed message description (if available) orIMessage.getDescription(). Details may e.g., include file position or line number. As e.g. xText cares for location and position itself, this information would be superfluous there, but helpful in a command line context, where this method shall be used instead.- Specified by:
getDetailedDescriptionin interfaceIMessage- Returns:
- the (detailed) message description
-
getStatus
Description copied from interface:IMessageReturns the status of this message. -
containsError
Utility method returning whether there is an error message in the givenmessages.- Parameters:
messages- the messages (may be null)- Returns:
trueif there is an error,falseelse
-
toString
Utility method returning a string representation of a given set ofmessages.- Parameters:
messages- the messages (may be null)filter- just messages of the given status shall be returned (null for all)- Returns:
- the string representation
-