net.sf.sdedit.diagram
Class MessageData

java.lang.Object
  extended by net.sf.sdedit.diagram.MessageData
Direct Known Subclasses:
TextBasedMessageData

public class MessageData
extends Object

A MessageData object encapsulates all data characterizing a message that is displayed by a sequence diagram.

Author:
Markus Strauch

Constructor Summary
MessageData()
           
 
Method Summary
 String getAnswer()
           
 int getAnswerNoteNumber()
           
 int getBroadcastType()
          Returns an integer number indicating if this MessageData specifies a message from the sender of a broadcast message to a single receiver.
 String getCallee()
           
 String getCalleeMnemonic()
          Returns a mnemonic for the callee object, if one is defined in this message, otherwise an empty string.
 String[] getCallees()
          Returns an array of length at least 2 if this MessageData specifies a BroadcastMessage, otherwise an empty array.
 String getCaller()
           
 String getCallerMnemonic()
          Returns the mnemonic identifying this message's caller object, if there is such a mnemonic, otherwise an empty string.
 int getLevel()
           
 String getMessage()
           
 int getNoteNumber()
           
 String getProperty(String propertyName)
           
 int getThread()
           
 boolean isDestroyMessage()
          Returns true if the message starts with "destroy(" or if it equals "destroy"
 boolean isNewMessage()
          Returns true if the message starts with "new(" or if it equals "new"
 boolean isSpawnMessage()
           
 boolean returnsInstantly()
           
 void setAnswer(String answer)
           
 void setAnswerNoteNumber(int answerNoteNumber)
           
 void setBroadcastType(int broadcastType)
          Sets an integer number indicating if this MessageData specifies a message from the sender of a broadcast message to a single receiver.
 void setCallee(String callee)
           
 void setCalleeMnemonic(String calleeMnemonic)
          Sets a mnemonic for the callee object.
 void setCallees(String[] callees)
           
 void setCaller(String caller)
           
 void setCallerMnemonic(String callerMnemonic)
          Sets the mnemonic identifying this message's caller object.
 void setLevel(int level)
           
 void setMessage(String message)
           
 void setNoteNumber(int number)
           
 void setProperties(String properties)
           
 void setProperty(String name, String value)
           
 void setReturnsInstantly(boolean on)
           
 void setSpawnMessage(boolean spawnMessage)
           
 void setThread(int thread)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

MessageData

public MessageData()
Method Detail

isNewMessage

public boolean isNewMessage()
Returns true if the message starts with "new(" or if it equals "new"

Returns:
true if the message starts with "new(" or if it equals "new"

setProperties

public void setProperties(String properties)

setProperty

public void setProperty(String name,
                        String value)

getProperty

public String getProperty(String propertyName)

isDestroyMessage

public boolean isDestroyMessage()
Returns true if the message starts with "destroy(" or if it equals "destroy"

Returns:
true if the message starts with "destroy(" or if it equals "destroy"

getAnswer

public String getAnswer()
Returns:
the answer

setAnswer

public void setAnswer(String answer)
Parameters:
answer - the answer to set

getCallee

public String getCallee()
Returns:
the callee

setCallee

public void setCallee(String callee)
Parameters:
callee - the callee to set

getCaller

public String getCaller()
Returns:
the caller

setCaller

public void setCaller(String caller)
Parameters:
caller - the caller to set

getLevel

public int getLevel()
Returns:
the level

setLevel

public void setLevel(int level)
Parameters:
level - the level to set

setNoteNumber

public void setNoteNumber(int number)

getNoteNumber

public int getNoteNumber()

getMessage

public String getMessage()
Returns:
the message

setMessage

public void setMessage(String message)
Parameters:
message - the message to set

isSpawnMessage

public boolean isSpawnMessage()
Returns:
the spawnMessage

setSpawnMessage

public void setSpawnMessage(boolean spawnMessage)
Parameters:
spawnMessage - the spawnMessage to set

getThread

public int getThread()
Returns:
the thread

setThread

public void setThread(int thread)
Parameters:
thread - the thread to set

getCalleeMnemonic

public String getCalleeMnemonic()
Returns a mnemonic for the callee object, if one is defined in this message, otherwise an empty string.

Returns:
a mnemonic for the callee object

setCalleeMnemonic

public void setCalleeMnemonic(String calleeMnemonic)
Sets a mnemonic for the callee object.

Parameters:
calleeMnemonic - a mnemonic for the callee object

getCallerMnemonic

public String getCallerMnemonic()
Returns the mnemonic identifying this message's caller object, if there is such a mnemonic, otherwise an empty string.

Returns:
the mnemonic identifying this message's caller object

setCallerMnemonic

public void setCallerMnemonic(String callerMnemonic)
Sets the mnemonic identifying this message's caller object.

Parameters:
callerMnemonic - the mnemonic identifying this message's caller object

setReturnsInstantly

public void setReturnsInstantly(boolean on)

returnsInstantly

public boolean returnsInstantly()

getAnswerNoteNumber

public int getAnswerNoteNumber()

setAnswerNoteNumber

public void setAnswerNoteNumber(int answerNoteNumber)

getCallees

public String[] getCallees()
Returns an array of length at least 2 if this MessageData specifies a BroadcastMessage, otherwise an empty array.

Returns:
an array of length at least 2 if this MessageData specifies a BroadcastMessage, otherwise an empty array

setCallees

public void setCallees(String[] callees)

getBroadcastType

public int getBroadcastType()
Returns an integer number indicating if this MessageData specifies a message from the sender of a broadcast message to a single receiver.
value interpretation
0 not a part of a broadcast
1 the first part of a broadcast
2 a part of a broadcast, but
neither the first nor the last
3 the last part of a broadcast

Returns:
an integer number indicating if this MessageData specifies a message from the sender of a broadcast message to a single receiver.

setBroadcastType

public void setBroadcastType(int broadcastType)
Sets an integer number indicating if this MessageData specifies a message from the sender of a broadcast message to a single receiver.
value interpretation
0 not a part of a broadcast
1 the first part of a broadcast
2 a part of a broadcast, but
neither the first nor the last
3 the last part of a broadcast

Parameters:
broadcastType - an integer number indicating if this MessageData specifies a message from the sender of a broadcast message to a single receiver


Copyright © 2011. All Rights Reserved.