mirror of https://github.com/apache/activemq.git
use helper methods to read the primitive nested types like BrokerId
git-svn-id: https://svn.apache.org/repos/asf/incubator/activemq/trunk@366551 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
parent
2942846abc
commit
034949a481
|
@ -106,16 +106,12 @@ namespace OpenWire.Core.IO
|
|||
}
|
||||
out << " info.${propertyName} = "
|
||||
|
||||
type = property.type.qualifiedName
|
||||
type = property.type.simpleName
|
||||
switch (type) {
|
||||
case "java.lang.String":
|
||||
case "String":
|
||||
out << "dataIn.ReadString()"
|
||||
break;
|
||||
|
||||
case "org.apache.activemq.command.ActiveMQDestination":
|
||||
out << "ReadDestination(dataIn)"
|
||||
break;
|
||||
|
||||
case "boolean":
|
||||
out << "dataIn.ReadBoolean()"
|
||||
break;
|
||||
|
@ -147,9 +143,17 @@ namespace OpenWire.Core.IO
|
|||
case "double":
|
||||
out << "dataIn.ReadDouble()"
|
||||
break;
|
||||
|
||||
case "ActiveMQDestination":
|
||||
out << "ReadDestination(dataIn)"
|
||||
break;
|
||||
|
||||
case "BrokerId[]":
|
||||
out << "ReadBrokerIds(dataIn)"
|
||||
break;
|
||||
|
||||
default:
|
||||
out << "(${property.type.simpleName}) ReadCommand(dataIn, \"${type}\")"
|
||||
out << "Read${type}(dataIn)"
|
||||
}
|
||||
out << """;
|
||||
"""
|
||||
|
@ -176,16 +180,12 @@ namespace OpenWire.Core.IO
|
|||
def getter = "info." + propertyName
|
||||
out << " "
|
||||
|
||||
type = property.type.qualifiedName
|
||||
type = property.type.simpleName
|
||||
switch (type) {
|
||||
case "java.lang.String":
|
||||
case "String":
|
||||
out << "dataOut.Write($getter);"
|
||||
break;
|
||||
|
||||
case "org.apache.activemq.command.ActiveMQDestination":
|
||||
out << "WriteDestination($getter, dataOut);"
|
||||
break;
|
||||
|
||||
case "boolean":
|
||||
out << "dataOut.Write($getter);"
|
||||
break;
|
||||
|
@ -218,8 +218,16 @@ namespace OpenWire.Core.IO
|
|||
out << "dataOut.Write($getter);"
|
||||
break;
|
||||
|
||||
case "ActiveMQDestination":
|
||||
out << "WriteDestination($getter, dataOut);"
|
||||
break;
|
||||
|
||||
case "BrokerId[]":
|
||||
out << "dataOut.WriteBrokerIds($getter);"
|
||||
break;
|
||||
|
||||
default:
|
||||
out << "WriteCommand($getter, dataOut, \"${type}\");"
|
||||
out << "Write${type}($getter, dataOut);"
|
||||
}
|
||||
out << """
|
||||
"""
|
||||
|
|
Loading…
Reference in New Issue