org.ros.internal.message
Class MessageContext

java.lang.Object
  extended by org.ros.internal.message.MessageContext

public class MessageContext
extends java.lang.Object


Constructor Summary
MessageContext(MessageDeclaration messageDeclaration)
           
 
Method Summary
<T> void
addConstantField(FieldType type, java.lang.String name, T value)
           
<T> void
addConstantListField(java.lang.String name, FieldType type, java.util.List<T> value)
           
 void addValueField(FieldType type, java.lang.String name)
           
 void addValueListField(FieldType type, java.lang.String name)
           
 boolean equals(java.lang.Object obj)
           
 java.lang.String getDefinition()
           
 Field getField(java.lang.String name)
           
 java.util.List<Field> getFields()
           
 MessageIdentifier getMessageIdentifer()
           
 java.lang.String getName()
           
 java.lang.String getPackage()
           
 java.lang.String getType()
           
 boolean hasField(FieldType type, java.lang.String name)
           
 int hashCode()
           
static MessageContext newFromStrings(java.lang.String type, java.lang.String definition)
           
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

MessageContext

public MessageContext(MessageDeclaration messageDeclaration)
Method Detail

newFromStrings

public static MessageContext newFromStrings(java.lang.String type,
                                            java.lang.String definition)

getMessageIdentifer

public MessageIdentifier getMessageIdentifer()

getType

public java.lang.String getType()

getPackage

public java.lang.String getPackage()

getName

public java.lang.String getName()

getDefinition

public java.lang.String getDefinition()

addConstantField

public <T> void addConstantField(FieldType type,
                                 java.lang.String name,
                                 T value)

addConstantListField

public <T> void addConstantListField(java.lang.String name,
                                     FieldType type,
                                     java.util.List<T> value)

addValueField

public void addValueField(FieldType type,
                          java.lang.String name)

addValueListField

public void addValueListField(FieldType type,
                              java.lang.String name)

hasField

public boolean hasField(FieldType type,
                        java.lang.String name)

getField

public Field getField(java.lang.String name)

getFields

public java.util.List<Field> getFields()
Returns:
the List of Fields in the order they were added

hashCode

public int hashCode()
Overrides:
hashCode in class java.lang.Object

equals

public boolean equals(java.lang.Object obj)
Overrides:
equals in class java.lang.Object