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} = "
|
out << " info.${propertyName} = "
|
||||||
|
|
||||||
type = property.type.qualifiedName
|
type = property.type.simpleName
|
||||||
switch (type) {
|
switch (type) {
|
||||||
case "java.lang.String":
|
case "String":
|
||||||
out << "dataIn.ReadString()"
|
out << "dataIn.ReadString()"
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case "org.apache.activemq.command.ActiveMQDestination":
|
|
||||||
out << "ReadDestination(dataIn)"
|
|
||||||
break;
|
|
||||||
|
|
||||||
case "boolean":
|
case "boolean":
|
||||||
out << "dataIn.ReadBoolean()"
|
out << "dataIn.ReadBoolean()"
|
||||||
break;
|
break;
|
||||||
|
@ -148,8 +144,16 @@ namespace OpenWire.Core.IO
|
||||||
out << "dataIn.ReadDouble()"
|
out << "dataIn.ReadDouble()"
|
||||||
break;
|
break;
|
||||||
|
|
||||||
|
case "ActiveMQDestination":
|
||||||
|
out << "ReadDestination(dataIn)"
|
||||||
|
break;
|
||||||
|
|
||||||
|
case "BrokerId[]":
|
||||||
|
out << "ReadBrokerIds(dataIn)"
|
||||||
|
break;
|
||||||
|
|
||||||
default:
|
default:
|
||||||
out << "(${property.type.simpleName}) ReadCommand(dataIn, \"${type}\")"
|
out << "Read${type}(dataIn)"
|
||||||
}
|
}
|
||||||
out << """;
|
out << """;
|
||||||
"""
|
"""
|
||||||
|
@ -176,16 +180,12 @@ namespace OpenWire.Core.IO
|
||||||
def getter = "info." + propertyName
|
def getter = "info." + propertyName
|
||||||
out << " "
|
out << " "
|
||||||
|
|
||||||
type = property.type.qualifiedName
|
type = property.type.simpleName
|
||||||
switch (type) {
|
switch (type) {
|
||||||
case "java.lang.String":
|
case "String":
|
||||||
out << "dataOut.Write($getter);"
|
out << "dataOut.Write($getter);"
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case "org.apache.activemq.command.ActiveMQDestination":
|
|
||||||
out << "WriteDestination($getter, dataOut);"
|
|
||||||
break;
|
|
||||||
|
|
||||||
case "boolean":
|
case "boolean":
|
||||||
out << "dataOut.Write($getter);"
|
out << "dataOut.Write($getter);"
|
||||||
break;
|
break;
|
||||||
|
@ -218,8 +218,16 @@ namespace OpenWire.Core.IO
|
||||||
out << "dataOut.Write($getter);"
|
out << "dataOut.Write($getter);"
|
||||||
break;
|
break;
|
||||||
|
|
||||||
|
case "ActiveMQDestination":
|
||||||
|
out << "WriteDestination($getter, dataOut);"
|
||||||
|
break;
|
||||||
|
|
||||||
|
case "BrokerId[]":
|
||||||
|
out << "dataOut.WriteBrokerIds($getter);"
|
||||||
|
break;
|
||||||
|
|
||||||
default:
|
default:
|
||||||
out << "WriteCommand($getter, dataOut, \"${type}\");"
|
out << "Write${type}($getter, dataOut);"
|
||||||
}
|
}
|
||||||
out << """
|
out << """
|
||||||
"""
|
"""
|
||||||
|
|
Loading…
Reference in New Issue