org.scribble.protocol.model
Class MessageSignature

java.lang.Object
  extended by org.scribble.protocol.model.ModelObject
      extended by org.scribble.protocol.model.MessageSignature

public class MessageSignature
extends ModelObject

This class represents a message signature. Message signatures can be either a simple signature with a unique TypeReference, or an operation name with several TypeReferences as arguments.


Constructor Summary
MessageSignature()
          The default constructor.
MessageSignature(MessageSignature msig)
          The copy constructor.
MessageSignature(String operation, Collection<TypeReference> typeRefs)
          Constructor for MessageSignatures that comprise an operation.
MessageSignature(TypeReference typeRef)
          No-operation constructor: only one TypeReference is allowed.
 
Method Summary
 boolean equals(Object obj)
           
 String getOperation()
          This method returns the optional operation.
 List<TypeReference> getTypeReferences()
          This method returns the list of type references.
 int hashCode()
           
 void setOperation(String operation)
          This method sets the operation.
 String toString()
           
 void visit(Visitor visitor)
          This method visits the model object using the supplied visitor.
 
Methods inherited from class org.scribble.protocol.model.ModelObject
derivedFrom, getAnnotations, getModel, getParent, getProperties, setParent
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
 

Constructor Detail

MessageSignature

public MessageSignature()
The default constructor.


MessageSignature

public MessageSignature(TypeReference typeRef)
No-operation constructor: only one TypeReference is allowed.

Parameters:
typeRef - The TypeReference for this simply-typed message.

MessageSignature

public MessageSignature(String operation,
                        Collection<TypeReference> typeRefs)
Constructor for MessageSignatures that comprise an operation.

Parameters:
operation - The operation name.
typeRefs - The arguments for the operation.

MessageSignature

public MessageSignature(MessageSignature msig)
The copy constructor.

Parameters:
msig - The message signature
Method Detail

getOperation

public String getOperation()
This method returns the optional operation.

Returns:
The optional operation

setOperation

public void setOperation(String operation)
This method sets the operation.

Parameters:
operation - The operation

getTypeReferences

public List<TypeReference> getTypeReferences()
This method returns the list of type references. If no operation is defined, then only one type reference should be defined.

Returns:
The list of type references

hashCode

public int hashCode()
Overrides:
hashCode in class Object

equals

public boolean equals(Object obj)
Overrides:
equals in class Object

toString

public String toString()
Overrides:
toString in class Object

visit

public void visit(Visitor visitor)
This method visits the model object using the supplied visitor.

Specified by:
visit in class ModelObject
Parameters:
visitor - The visitor


Copyright © 2008-Present Scribble.org. All Rights Reserved.