in src/main/java/org/apache/activemq/nms/openwire/tool/commands/MessageGenerator.java [105:119]
protected void generateCloneBody( PrintWriter out ) {
out.println(" // Since we are a derived class use the base's Clone()");
out.println(" // to perform the shallow copy. Since it is shallow it");
out.println(" // will include our derived class. Since we are derived,");
out.println(" // this method is an override.");
out.println(" " + getClassName() + " o = (" + getClassName() + ") base.Clone();");
out.println("");
out.println(" if( this.messageId != null )");
out.println(" {");
out.println(" o.MessageId = (MessageId) this.messageId.Clone();");
out.println(" }");
out.println("");
out.println(" return o;");
}