Class Interactions


  • public class Interactions
    extends java.lang.Object
    Convenient static methods to work with Interactions elements.
    • Constructor Detail

      • Interactions

        public Interactions()
    • Method Detail

      • getReceiveElement

        @CheckForNull
        public static Element getReceiveElement​(Message message)
        Gets the receive element.
        Parameters:
        message - the message
        Returns:
        the receive element
      • getSendElement

        @CheckForNull
        public static Element getSendElement​(Message message)
        Return send event holder of the given message.

        It can be:

        • covered lifeline
        • gate owner (Interaction, CombinedFragment, InteractionUse)
        Parameters:
        message - Given message, which will be analysed
        Returns:
        One of Lifeline, Interaction, CombinedFragment, InteractionUse. Can return null, if message has no send event
      • getRemovableConnectableElement

        @CheckForNull
        public static ConnectableElement getRemovableConnectableElement​(Lifeline lifeline)
        Check if the represents can be removed along with lifeline.
        Parameters:
        lifeline - lifeline
        Returns:
        connectible element that should be disposed
      • getSignalOfMessage

        @CheckForNull
        public static Signal getSignalOfMessage​(Message message)
        Gets the signal of message.
        Parameters:
        message - the message
        Returns:
        the signal of message
      • isSendMessage

        public static boolean isSendMessage​(Message message)
        Checks if is send message.
        Parameters:
        message - the message
        Returns:
        true, if is send message
      • isLostMessage

        public static boolean isLostMessage​(Message message)
        Indicates if given message is a lost message.
        Parameters:
        message - message to check.
        Returns:
        true if given message is a lost message, false otherwise.
      • isFoundMessage

        public static boolean isFoundMessage​(Message message)
        Indicates if given message is a found message.
        Parameters:
        message - message to check.
        Returns:
        true if given message is a found message, false otherwise.
      • isSynchMessage

        public static boolean isSynchMessage​(Message msg)
        Checks if is synch message.
        Parameters:
        msg - the msg
        Returns:
        true, if is synch message
      • isDestroyMessage

        public static boolean isDestroyMessage​(Message msg)
        Checks if is destroy message.
        Parameters:
        msg - the msg
        Returns:
        true, if is destroy message
      • isReplyMessage

        public static boolean isReplyMessage​(Message message)
        Indicates if this message is a reply message.
        Parameters:
        message - - message to check.
        Returns:
        true if this is a reply message, false otherwise.
      • isCallMessage

        public static boolean isCallMessage​(Message message)
        Indicates if message is a call message.
        Parameters:
        message - - message to check.
        Returns:
        true if this message is a call message, false otherwise.
      • isCreateMessage

        public static boolean isCreateMessage​(Message msg)
        Checks if is creates the message.
        Parameters:
        msg - the msg
        Returns:
        true, if is creates the message
      • getMessageSubstitute

        public static Message getMessageSubstitute​(Message message)
        Returns message substitute for given message or the given message, if no substitution found. Message substitution is message found by the formal gate.
        Parameters:
        message - message, for which substitution will be searched
        Returns:
        given message if no substitution found
      • getOperationOfCallMessage

        @CheckForNull
        public static Operation getOperationOfCallMessage​(Message message)
        Gets the operation of call message.
        Parameters:
        message - the message
        Returns:
        the operation of call message