mil.dod.th.ose.shared/src/mil/dod/th/ose/shared/protoconverter/MessageConverter.java
public static Object convertToJaxbRec(final Message protoMsg)
            throws ObjectConverterException
    {
        //UUID is not an XSD generated class and does not have a standard no arguments constructor and therefore
        //must be handled separately.
        if (protoMsg.getClass().getSimpleName().equals(UUID.class.getSimpleName()))
        {
            return handleUUID((SharedMessages.UUID)protoMsg); 
        }
        //The Multitype protocol class does not have a corresponding JAXB class and therefore must have a special case
        //to handle the conversion. In JAXB classes the multitype is represented by a generic Object.
        else if (protoMsg.getClass().getSimpleName().equals(Multitype.class.getSimpleName()))
        {
            return handleMultitype((Multitype)protoMsg);
        }
        final Object jaxbObj = createEmptyJaxb(protoMsg);
        for (FieldDescriptor fieldDesc : protoMsg.getDescriptorForType().getFields())
        {
            if (fieldDesc.isRepeated())
            {
                handleRepeatedField(jaxbObj, protoMsg, fieldDesc); 
            }
            else
            { 
                handleStandardField(jaxbObj, protoMsg, fieldDesc);
            }
        }
        return jaxbObj;
    }
/**
     * The method responsible for handling the conversion of a Google Protocol Buffer message to an object.
     * 
     * @param protoMsg
     *          The {@link Message} being converted to an object.
     * @return
     *          The converted message as an object.
     * @throws ObjectConverterException
     *          When the Google Protocol Buffer message is unable to be converted to an object.
     */
The method responsible for handling the conversion of a Google Protocol Buffer message to an object.

@param protoMsg
The  Message being converted to an object.
@return
The converted message as an object.
@throws ObjectConverterException
When the Google Protocol Buffer message is unable to be converted to an object.
The method responsible for handling the conversion of a Google Protocol Buffer message to an object . @param protoMsg The Message being converted to an object . @return The converted message as an object . @throws ObjectConverterException When the Google Protocol Buffer message is unable to be converted to an object .
public static Object convertToJaxbRec(final Message protoMsg)
            throws ObjectConverterException
    {
        if (protoMsg.getClass().getSimpleName().equals(UUID.class.getSimpleName()))
        {
            return handleUUID((SharedMessages.UUID)protoMsg); 
        }
        else if (protoMsg.getClass().getSimpleName().equals(Multitype.class.getSimpleName()))
        {
            return handleMultitype((Multitype)protoMsg);
        }
        final Object jaxbObj = createEmptyJaxb(protoMsg);
        for (FieldDescriptor fieldDesc : protoMsg.getDescriptorForType().getFields())
        {
            if (fieldDesc.isRepeated())
            {
                handleRepeatedField(jaxbObj, protoMsg, fieldDesc); 
            }
            else
            { 
                handleStandardField(jaxbObj, protoMsg, fieldDesc);
            }
        }
        return jaxbObj;
    }
public static Object convertToJaxbRec ( final Message protoMsg ) throws ObjectConverterException { if ( protoMsg . getClass ( ) . getSimpleName ( ) . equals ( UUID . class . getSimpleName ( ) ) ) { return handleUUID ( ( SharedMessages . UUID ) protoMsg ) ; } else if ( protoMsg . getClass ( ) . getSimpleName ( ) . equals ( Multitype . class . getSimpleName ( ) ) ) { return handleMultitype ( ( Multitype ) protoMsg ) ; } final Object jaxbObj = createEmptyJaxb ( protoMsg ) ; for ( FieldDescriptor fieldDesc : protoMsg . getDescriptorForType ( ) . getFields ( ) ) { if ( fieldDesc . isRepeated ( ) ) { handleRepeatedField ( jaxbObj , protoMsg , fieldDesc ) ; } else { handleStandardField ( jaxbObj , protoMsg , fieldDesc ) ; } } return jaxbObj ; }
The method responsible for handling the conversion of a Google Protocol Buffer message to an object.
The method responsible for handling the conversion of a Google Protocol Buffer message to an object .
//UUID is not an XSD generated class and does not have a standard no arguments constructor and therefore //must be handled separately. //The Multitype protocol class does not have a corresponding JAXB class and therefore must have a special case //to handle the conversion. In JAXB classes the multitype is represented by a generic Object.