Class DrawStatement


  • public final class DrawStatement
    extends java.lang.Object
    Internal class for caching the different draw statements.
    Since:
    1.4.1 (17.01.2014)
    Author:
    oliver
    • Field Summary

      Fields 
      Modifier and Type Field Description
      static DrawStatement NULL
      The Constant NULL.
    • Constructor Summary

      Constructors 
      Constructor Description
      DrawStatement​(java.lang.String senderName, java.lang.Object createdObject, java.lang.String typeName, org.aspectj.lang.JoinPoint.StaticPart jpInfo)
      Instantiates a new draw statement.
      DrawStatement​(java.lang.String receiverName, java.lang.String returnee, java.lang.Object returnValue, org.aspectj.lang.JoinPoint.StaticPart jpInfo)
      Instantiates a new draw statement.
      DrawStatement​(java.lang.String sender, java.lang.String target, org.aspectj.lang.JoinPoint.StaticPart jpInfo, java.lang.Object[] args)
      Instantiates a new draw statement.
      DrawStatement​(DrawType type, java.lang.String name, java.lang.String objectName)
      Instantiates a new draw statement of type 'ACTOR' or 'OBJECT'.
      DrawStatement​(DrawType type, java.lang.String sender, org.aspectj.lang.JoinPoint.StaticPart jpInfo)
      Instantiates a new draw statement of type 'PLACE_HOLDER'.
    • Field Detail

      • NULL

        public static final DrawStatement NULL
        The Constant NULL.
    • Constructor Detail

      • DrawStatement

        public DrawStatement​(DrawType type,
                             java.lang.String sender,
                             org.aspectj.lang.JoinPoint.StaticPart jpInfo)
        Instantiates a new draw statement of type 'PLACE_HOLDER'.
        Parameters:
        type - the type
        sender - the sender (or name) for the given type
        jpInfo - the jp info
      • DrawStatement

        public DrawStatement​(DrawType type,
                             java.lang.String name,
                             java.lang.String objectName)
        Instantiates a new draw statement of type 'ACTOR' or 'OBJECT'.
        Parameters:
        type - the type
        name - the name
        objectName - the object name
      • DrawStatement

        public DrawStatement​(java.lang.String senderName,
                             java.lang.Object createdObject,
                             java.lang.String typeName,
                             org.aspectj.lang.JoinPoint.StaticPart jpInfo)
        Instantiates a new draw statement.
        Parameters:
        senderName - the sender name
        createdObject - the created object
        typeName - the type name
        jpInfo - the jp info
      • DrawStatement

        public DrawStatement​(java.lang.String sender,
                             java.lang.String target,
                             org.aspectj.lang.JoinPoint.StaticPart jpInfo,
                             java.lang.Object[] args)
        Instantiates a new draw statement.
        Parameters:
        sender - the sender
        target - the target
        jpInfo - the jp info
        args - the args
      • DrawStatement

        public DrawStatement​(java.lang.String receiverName,
                             java.lang.String returnee,
                             java.lang.Object returnValue,
                             org.aspectj.lang.JoinPoint.StaticPart jpInfo)
        Instantiates a new draw statement.
        Parameters:
        receiverName - the receiver name
        returnee - the returnee
        returnValue - the return value
        jpInfo - the jp info
    • Method Detail

      • createTargetName

        public static java.lang.String createTargetName​(java.lang.Object createdObject)
        Creates the target name depending on the given object. If the given object has an id this id will be part of the generated name.
        Parameters:
        createdObject - the created object
        Returns:
        the string
      • getType

        public DrawType getType()
        Gets the type.
        Returns:
        the type
      • getSender

        public java.lang.String getSender()
        Gets the sender.
        Returns:
        the sender
      • getTarget

        public java.lang.String getTarget()
        Gets the target.
        Returns:
        the target
      • getJpInfo

        public org.aspectj.lang.JoinPoint.StaticPart getJpInfo()
        Gets the jp info.
        Returns:
        the jp info
      • getArgs

        public java.lang.Object[] getArgs()
        Gets the args.
        Returns:
        the args
      • getArgsAsString

        public java.lang.String getArgsAsString()
        Gets the args as string.
        Returns:
        the args as string
      • isFromCallJoinpoint

        public boolean isFromCallJoinpoint()
        Checks if the DrawStatement is generated from call joinpoint.
        Returns:
        true, if is generated from a call joinpoint
      • isFromExecutionJoinpoint

        public boolean isFromExecutionJoinpoint()
        Checks if the DrawStatement is generated from execution joinpoint.
        Returns:
        true, if is generated from a execution joinpoint
      • hasSameSignatureAs

        public boolean hasSameSignatureAs​(org.aspectj.lang.JoinPoint.StaticPart otherJpInfo)
        Checks if the given parameter has the same origin and source location as the DrawStatement.
        Parameters:
        otherJpInfo - the other Joinpoint info
        Returns:
        true, if successful
      • hasActor

        public boolean hasActor​(java.lang.String name)
        If the given name is part of any stored actor in this statement 'true' will be returned.
        Parameters:
        name - the name
        Returns:
        true, if is involved
      • hasMessage

        public boolean hasMessage()
        Checks for message.
        Returns:
        true, if successful
      • hasMessageToLeft

        public boolean hasMessageToLeft()
        A message points to left, if the given senderName was created after the given targetName. This information can be derived from the name.
        Returns:
        true, if successful
      • hasMessageToRight

        public boolean hasMessageToRight()
        Checks for message to right.
        Returns:
        true, if successful
      • hashCode

        public int hashCode()
        Hash code.
        Overrides:
        hashCode in class java.lang.Object
        Returns:
        the int
        See Also:
        Object.hashCode()
      • equals

        public boolean equals​(java.lang.Object obj)
        Equals.
        Overrides:
        equals in class java.lang.Object
        Parameters:
        obj - the obj
        Returns:
        true, if successful
        See Also:
        Object.equals(java.lang.Object)
      • toString

        public java.lang.String toString()
        To string.
        Overrides:
        toString in class java.lang.Object
        Returns:
        the string
        See Also:
        Object.toString()