activemq-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From chir...@apache.org
Subject svn commit: r565003 [4/17] - in /activemq/trunk: activemq-fileserver/src/main/java/org/apache/activemq/util/ activemq-fileserver/src/test/java/org/apache/activemq/util/ activemq-jaas/src/main/java/org/apache/activemq/jaas/ activemq-jaas/src/test/java/o...
Date Sun, 12 Aug 2007 05:27:34 GMT
Modified: activemq/trunk/activemq-openwire-generator/src/main/java/org/apache/activemq/openwire/tool/CSharpClassesGenerator.java
URL: http://svn.apache.org/viewvc/activemq/trunk/activemq-openwire-generator/src/main/java/org/apache/activemq/openwire/tool/CSharpClassesGenerator.java?view=diff&rev=565003&r1=565002&r2=565003
==============================================================================
--- activemq/trunk/activemq-openwire-generator/src/main/java/org/apache/activemq/openwire/tool/CSharpClassesGenerator.java (original)
+++ activemq/trunk/activemq-openwire-generator/src/main/java/org/apache/activemq/openwire/tool/CSharpClassesGenerator.java Sat Aug 11 22:27:21 2007
@@ -26,21 +26,20 @@
 import org.codehaus.jam.JProperty;
 
 /**
- *
  * @version $Revision: 383749 $
  */
 public class CSharpClassesGenerator extends MultiSourceGenerator {
-	
-	protected String targetDir="./src/main/csharp";
+
+    protected String targetDir = "./src/main/csharp";
 
     public Object run() {
         filePostFix = ".cs";
         if (destDir == null) {
-            destDir = new File(targetDir+"/ActiveMQ/Commands");
-        }        
+            destDir = new File(targetDir + "/ActiveMQ/Commands");
+        }
         return super.run();
     }
-    
+
     public String makeHashCodeBody() throws Exception {
         if (simpleName.endsWith("Id")) {
             StringWriter buffer = new StringWriter();
@@ -48,7 +47,7 @@
             out.println("            int answer = 0;");
             Iterator iter = getProperties().iterator();
             while (iter.hasNext()) {
-                JProperty property = (JProperty) iter.next();
+                JProperty property = (JProperty)iter.next();
                 out.println("            answer = (answer * 37) + HashCode(" + property.getSimpleName() + ");");
             }
             out.println("            return answer;");
@@ -61,10 +60,10 @@
         if (simpleName.endsWith("Id")) {
             StringWriter buffer = new StringWriter();
             PrintWriter out = new PrintWriter(buffer);
-            
+
             Iterator iter = getProperties().iterator();
             while (iter.hasNext()) {
-                JProperty property = (JProperty) iter.next();
+                JProperty property = (JProperty)iter.next();
                 String name = property.getSimpleName();
                 out.println("            if (! Equals(this." + name + ", that." + name + ")) return false;");
             }
@@ -73,149 +72,145 @@
         }
         return null;
     }
-    
+
     public String makeToStringBody() throws Exception {
-            StringWriter buffer = new StringWriter();
-            PrintWriter out = new PrintWriter(buffer);
-            out.println("            return GetType().Name + \"[\"");
-            Iterator iter = getProperties().iterator();
-            while (iter.hasNext()) {
-                JProperty property = (JProperty) iter.next();
-                String name = property.getSimpleName();
-                out.println("                + \" " + name + "=\" + " + name);
-            }
-            out.println("                + \" ]\";");
-            return buffer.toString();
+        StringWriter buffer = new StringWriter();
+        PrintWriter out = new PrintWriter(buffer);
+        out.println("            return GetType().Name + \"[\"");
+        Iterator iter = getProperties().iterator();
+        while (iter.hasNext()) {
+            JProperty property = (JProperty)iter.next();
+            String name = property.getSimpleName();
+            out.println("                + \" " + name + "=\" + " + name);
+        }
+        out.println("                + \" ]\";");
+        return buffer.toString();
     }
 
-	private void generateLicence(PrintWriter out) {
-out.println("/*");
-out.println(" * Licensed to the Apache Software Foundation (ASF) under one or more");
-out.println(" * contributor license agreements.  See the NOTICE file distributed with");
-out.println(" * this work for additional information regarding copyright ownership.");
-out.println(" * The ASF licenses this file to You under the Apache License, Version 2.0");
-out.println(" * (the \"License\"); you may not use this file except in compliance with");
-out.println(" * the License.  You may obtain a copy of the License at");
-out.println(" *");
-out.println(" * http://www.apache.org/licenses/LICENSE-2.0");
-out.println(" *");
-out.println(" * Unless required by applicable law or agreed to in writing, software");
-out.println(" * distributed under the License is distributed on an \"AS IS\" BASIS,");
-out.println(" * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.");
-out.println(" * See the License for the specific language governing permissions and");
-out.println(" * limitations under the License.");
-out.println(" */");
-	}
-
-
-	protected void generateFile(PrintWriter out) throws Exception {
-		generateLicence(out);
-
-out.println("//");
-out.println("//  NOTE!: This file is autogenerated - do not modify!");
-out.println("//         if you need to make a change, please see the Groovy scripts in the");
-out.println("//         activemq-core module");
-out.println("//");
-out.println("");
-out.println("using System;");
-out.println("using System.Collections;");
-out.println("");
-out.println("using ActiveMQ.OpenWire;");
-out.println("using ActiveMQ.Commands;");
-out.println("");
-out.println("namespace ActiveMQ.Commands");
-out.println("{");
-out.println("    /// <summary>");
-out.println("    ///  The ActiveMQ "+jclass.getSimpleName()+" Command");
-out.println("    /// </summary>");
-  out.print("    public class "+jclass.getSimpleName()+" : "+baseClass);
-
-
-  	for (int i = 0; i < jclass.getInterfaces().length; i++) {
-		JClass intf = jclass.getInterfaces()[i];
-		out.print(", "+intf.getSimpleName());
-	}
-    
-out.println("");
-out.println("    {");
-out.println("        public const byte ID_"+jclass.getSimpleName()+" = "+getOpenWireOpCode(jclass)+";");
-out.println("    			");
-
-		List properties = getProperties();
-		String type;
-		Object name;
-		for (Iterator iter = properties.iterator(); iter.hasNext();) {
-			JProperty property = (JProperty) iter.next();
-	        type = toCSharpType(property.getType());
-	        name = decapitalize(property.getSimpleName());
-out.println("        "+type+" "+name+";");
-    }
-
-	String text = makeHashCodeBody();
-	if (text != null) {
-out.println("");
-out.println("		public override int GetHashCode() {");
-out.println(""+text+"");
-out.println("		}");
-	}
-
-	text = makeEqualsBody();
-	if (text != null) {
-out.println("");
-out.println("		public override bool Equals(object that) {");
-out.println("	    	if (that is "+className+") {");
-out.println("	    	    return Equals(("+className+") that);");
-out.println("			}");
-out.println("			return false;");
-out.println("    	}");
-out.println("");    
-out.println("		public virtual bool Equals("+className+" that) {");
-out.println(""+text+"");
-out.println("		}");
-	}
-	    
-	text = makeToStringBody();
-	if (text != null) {
-out.println("");	
-out.println("		public override string ToString() {");
-out.println(""+text+"");
-out.println("		}");
-	}
-	    
-out.println("");
-out.println("        public override byte GetDataStructureType() {");
-out.println("            return ID_"+jclass.getSimpleName()+";");
-out.println("        }");
-out.println("");
-out.println("");
-out.println("        // Properties");
-
-				for (Iterator iter = properties.iterator(); iter.hasNext();) {
-					JProperty property = (JProperty) iter.next();
-                    type = toCSharpType(property.getType());
-                    name = decapitalize(property.getSimpleName());
-                    String propertyName = property.getSimpleName();
-                    String getter = capitalize(property.getGetter().getSimpleName());
-                    String setter = capitalize(property.getSetter().getSimpleName());
-
-out.println("");
-out.println("        public "+type+" "+propertyName+"");
-out.println("        {");
-out.println("            get { return "+name+"; }");
-out.println("            set { this."+name+" = value; }            ");
-out.println("        }");
-                }
-
-out.println("");
-out.println("    }");
-out.println("}");
-	}
-
-	public String getTargetDir() {
-		return targetDir;
-	}
-
-	public void setTargetDir(String targetDir) {
-		this.targetDir = targetDir;
-	}
+    private void generateLicence(PrintWriter out) {
+        out.println("/*");
+        out.println(" * Licensed to the Apache Software Foundation (ASF) under one or more");
+        out.println(" * contributor license agreements.  See the NOTICE file distributed with");
+        out.println(" * this work for additional information regarding copyright ownership.");
+        out.println(" * The ASF licenses this file to You under the Apache License, Version 2.0");
+        out.println(" * (the \"License\"); you may not use this file except in compliance with");
+        out.println(" * the License.  You may obtain a copy of the License at");
+        out.println(" *");
+        out.println(" * http://www.apache.org/licenses/LICENSE-2.0");
+        out.println(" *");
+        out.println(" * Unless required by applicable law or agreed to in writing, software");
+        out.println(" * distributed under the License is distributed on an \"AS IS\" BASIS,");
+        out.println(" * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.");
+        out.println(" * See the License for the specific language governing permissions and");
+        out.println(" * limitations under the License.");
+        out.println(" */");
+    }
+
+    protected void generateFile(PrintWriter out) throws Exception {
+        generateLicence(out);
+
+        out.println("//");
+        out.println("//  NOTE!: This file is autogenerated - do not modify!");
+        out.println("//         if you need to make a change, please see the Groovy scripts in the");
+        out.println("//         activemq-core module");
+        out.println("//");
+        out.println("");
+        out.println("using System;");
+        out.println("using System.Collections;");
+        out.println("");
+        out.println("using ActiveMQ.OpenWire;");
+        out.println("using ActiveMQ.Commands;");
+        out.println("");
+        out.println("namespace ActiveMQ.Commands");
+        out.println("{");
+        out.println("    /// <summary>");
+        out.println("    ///  The ActiveMQ " + jclass.getSimpleName() + " Command");
+        out.println("    /// </summary>");
+        out.print("    public class " + jclass.getSimpleName() + " : " + baseClass);
+
+        for (int i = 0; i < jclass.getInterfaces().length; i++) {
+            JClass intf = jclass.getInterfaces()[i];
+            out.print(", " + intf.getSimpleName());
+        }
+
+        out.println("");
+        out.println("    {");
+        out.println("        public const byte ID_" + jclass.getSimpleName() + " = " + getOpenWireOpCode(jclass) + ";");
+        out.println("                ");
+
+        List properties = getProperties();
+        String type;
+        Object name;
+        for (Iterator iter = properties.iterator(); iter.hasNext();) {
+            JProperty property = (JProperty)iter.next();
+            type = toCSharpType(property.getType());
+            name = decapitalize(property.getSimpleName());
+            out.println("        " + type + " " + name + ";");
+        }
+
+        String text = makeHashCodeBody();
+        if (text != null) {
+            out.println("");
+            out.println("        public override int GetHashCode() {");
+            out.println("" + text + "");
+            out.println("        }");
+        }
+
+        text = makeEqualsBody();
+        if (text != null) {
+            out.println("");
+            out.println("        public override bool Equals(object that) {");
+            out.println("            if (that is " + className + ") {");
+            out.println("                return Equals((" + className + ") that);");
+            out.println("            }");
+            out.println("            return false;");
+            out.println("        }");
+            out.println("");
+            out.println("        public virtual bool Equals(" + className + " that) {");
+            out.println("" + text + "");
+            out.println("        }");
+        }
+
+        text = makeToStringBody();
+        if (text != null) {
+            out.println("");
+            out.println("        public override string ToString() {");
+            out.println("" + text + "");
+            out.println("        }");
+        }
+
+        out.println("");
+        out.println("        public override byte GetDataStructureType() {");
+        out.println("            return ID_" + jclass.getSimpleName() + ";");
+        out.println("        }");
+        out.println("");
+        out.println("");
+        out.println("        // Properties");
+
+        for (Iterator iter = properties.iterator(); iter.hasNext();) {
+            JProperty property = (JProperty)iter.next();
+            type = toCSharpType(property.getType());
+            name = decapitalize(property.getSimpleName());
+            String propertyName = property.getSimpleName();
+
+            out.println("");
+            out.println("        public " + type + " " + propertyName + "");
+            out.println("        {");
+            out.println("            get { return " + name + "; }");
+            out.println("            set { this." + name + " = value; }            ");
+            out.println("        }");
+        }
+
+        out.println("");
+        out.println("    }");
+        out.println("}");
+    }
+
+    public String getTargetDir() {
+        return targetDir;
+    }
+
+    public void setTargetDir(String targetDir) {
+        this.targetDir = targetDir;
+    }
 }

Modified: activemq/trunk/activemq-openwire-generator/src/main/java/org/apache/activemq/openwire/tool/CSharpGeneratorTask.java
URL: http://svn.apache.org/viewvc/activemq/trunk/activemq-openwire-generator/src/main/java/org/apache/activemq/openwire/tool/CSharpGeneratorTask.java?view=diff&rev=565003&r1=565002&r2=565003
==============================================================================
--- activemq/trunk/activemq-openwire-generator/src/main/java/org/apache/activemq/openwire/tool/CSharpGeneratorTask.java (original)
+++ activemq/trunk/activemq-openwire-generator/src/main/java/org/apache/activemq/openwire/tool/CSharpGeneratorTask.java Sat Aug 11 22:27:21 2007
@@ -26,92 +26,93 @@
 import org.codehaus.jam.JamServiceParams;
 
 /**
- * 
  * @version $Revision: 384826 $
  */
 public class CSharpGeneratorTask extends Task {
-	
-	int version = 2;
-	File source = new File(".");
-	File target = new File(".");
-	
+
+    int version = 2;
+    File source = new File(".");
+    File target = new File(".");
+
     public static void main(String[] args) {
-    	
+
         Project project = new Project();
         project.init();
-    	CSharpGeneratorTask generator = new CSharpGeneratorTask();
-    	generator.setProject(project);
-    	
-    	if( args.length > 0 ) {
-    		generator.version = Integer.parseInt(args[0]);
-    	}
-
-    	if( args.length > 1 ) {
-    		generator.source = new File(args[1]);
-    	}  
-    	
-    	if( args.length > 2 ) {
-    		generator.target = new File(args[2]);
-    	}    	
-    	
-    	generator.execute();
-	}
-    
+        CSharpGeneratorTask generator = new CSharpGeneratorTask();
+        generator.setProject(project);
+
+        if (args.length > 0) {
+            generator.version = Integer.parseInt(args[0]);
+        }
+
+        if (args.length > 1) {
+            generator.source = new File(args[1]);
+        }
+
+        if (args.length > 2) {
+            generator.target = new File(args[2]);
+        }
+
+        generator.execute();
+    }
+
     public void execute() throws BuildException {
         try {
-        	
-        	String sourceDir = source+"/src/main/java";
-        	
+
+            String sourceDir = source + "/src/main/java";
+
             System.out.println("Parsing source files in: " + sourceDir);
 
             JamServiceFactory jamServiceFactory = JamServiceFactory.getInstance();
-            JamServiceParams params = jamServiceFactory.createServiceParams();            
-            File[] dirs = new File[]{new File(sourceDir)};            
+            JamServiceParams params = jamServiceFactory.createServiceParams();
+            File[] dirs = new File[] {
+                new File(sourceDir)
+            };
             params.includeSourcePattern(dirs, "**/*.java");
             JamService jam = jamServiceFactory.createService(params);
 
             {
-            	CSharpClassesGenerator script = new CSharpClassesGenerator();
-	        	script.setJam(jam);
-	        	script.setTargetDir(target+"/src/main/csharp");
-	        	script.setOpenwireVersion(version);
-	        	script.run();
+                CSharpClassesGenerator script = new CSharpClassesGenerator();
+                script.setJam(jam);
+                script.setTargetDir(target + "/src/main/csharp");
+                script.setOpenwireVersion(version);
+                script.run();
             }
             {
-            	CSharpMarshallingGenerator script = new CSharpMarshallingGenerator();
-	        	script.setJam(jam);
-	        	script.setTargetDir(target+"/src/main/csharp");
-	        	script.setOpenwireVersion(version);
-	        	script.run();
+                CSharpMarshallingGenerator script = new CSharpMarshallingGenerator();
+                script.setJam(jam);
+                script.setTargetDir(target + "/src/main/csharp");
+                script.setOpenwireVersion(version);
+                script.run();
             }
-            
+
         } catch (Exception e) {
-        	throw new BuildException(e);
+            throw new BuildException(e);
         }
     }
 
-	public int getVersion() {
-		return version;
-	}
-
-	public void setVersion(int version) {
-		this.version = version;
-	}
-
-	public File getSource() {
-		return source;
-	}
-
-	public void setSource(File basedir) {
-		this.source = basedir;
-	}
-
-	public File getTarget() {
-		return target;
-	}
-
-	public void setTarget(File target) {
-		this.target = target;
-	}
+    public int getVersion() {
+        return version;
+    }
+
+    public void setVersion(int version) {
+        this.version = version;
+    }
+
+    public File getSource() {
+        return source;
+    }
+
+    public void setSource(File basedir) {
+        this.source = basedir;
+    }
+
+    public File getTarget() {
+        return target;
+    }
+
+    public void setTarget(File target) {
+        this.target = target;
+    }
 
 }

Modified: activemq/trunk/activemq-openwire-generator/src/main/java/org/apache/activemq/openwire/tool/CSharpMarshallingGenerator.java
URL: http://svn.apache.org/viewvc/activemq/trunk/activemq-openwire-generator/src/main/java/org/apache/activemq/openwire/tool/CSharpMarshallingGenerator.java?view=diff&rev=565003&r1=565002&r2=565003
==============================================================================
--- activemq/trunk/activemq-openwire-generator/src/main/java/org/apache/activemq/openwire/tool/CSharpMarshallingGenerator.java (original)
+++ activemq/trunk/activemq-openwire-generator/src/main/java/org/apache/activemq/openwire/tool/CSharpMarshallingGenerator.java Sat Aug 11 22:27:21 2007
@@ -16,33 +16,37 @@
  */
 package org.apache.activemq.openwire.tool;
 
+import java.io.File;
+import java.io.PrintWriter;
+import java.util.ArrayList;
+import java.util.Collections;
+import java.util.Comparator;
+import java.util.Iterator;
+import java.util.List;
+
 import org.codehaus.jam.JAnnotation;
 import org.codehaus.jam.JAnnotationValue;
 import org.codehaus.jam.JClass;
 import org.codehaus.jam.JProperty;
 
-import java.io.*;
-import java.util.*;
-
 /**
- *
  * @version $Revision: 384390 $
  */
 public class CSharpMarshallingGenerator extends JavaMarshallingGenerator {
 
-	protected String targetDir="./src/main/csharp";
+    protected String targetDir = "./src/main/csharp";
 
     public Object run() {
         filePostFix = ".cs";
         if (destDir == null) {
-            destDir = new File(targetDir+"/ActiveMQ/OpenWire/V"+getOpenwireVersion());
-        }        
+            destDir = new File(targetDir + "/ActiveMQ/OpenWire/V" + getOpenwireVersion());
+        }
         return super.run();
     }
-    
-    //////////////////////////////////////////////////////////////////////////////////////
+
+    // ////////////////////////////////////////////////////////////////////////////////////
     // This section is for the tight wire format encoding generator
-    //////////////////////////////////////////////////////////////////////////////////////
+    // ////////////////////////////////////////////////////////////////////////////////////
 
     protected void generateTightUnmarshalBodyForProperty(PrintWriter out, JProperty property, JAnnotationValue size) {
 
@@ -51,40 +55,29 @@
 
         if (type.equals("boolean")) {
             out.println("        info." + propertyName + " = bs.ReadBoolean();");
-        }
-        else if (type.equals("byte")) {
+        } else if (type.equals("byte")) {
             out.println("        info." + propertyName + " = dataIn.ReadByte();");
-        }
-        else if (type.equals("char")) {
+        } else if (type.equals("char")) {
             out.println("        info." + propertyName + " = dataIn.ReadChar();");
-        }
-        else if (type.equals("short")) {
+        } else if (type.equals("short")) {
             out.println("        info." + propertyName + " = dataIn.ReadInt16();");
-        }
-        else if (type.equals("int")) {
+        } else if (type.equals("int")) {
             out.println("        info." + propertyName + " = dataIn.ReadInt32();");
-        }
-        else if (type.equals("long")) {
+        } else if (type.equals("long")) {
             out.println("        info." + propertyName + " = TightUnmarshalLong(wireFormat, dataIn, bs);");
-        }
-        else if (type.equals("String")) {
+        } else if (type.equals("String")) {
             out.println("        info." + propertyName + " = TightUnmarshalString(dataIn, bs);");
-        }
-        else if (type.equals("byte[]") || type.equals("ByteSequence")) {
+        } else if (type.equals("byte[]") || type.equals("ByteSequence")) {
             if (size != null) {
                 out.println("        info." + propertyName + " = ReadBytes(dataIn, " + size.asInt() + ");");
-            }
-            else {
+            } else {
                 out.println("        info." + propertyName + " = ReadBytes(dataIn, bs.ReadBoolean());");
             }
-        }
-        else if (isThrowable(property.getType())) {
+        } else if (isThrowable(property.getType())) {
             out.println("        info." + propertyName + " = TightUnmarshalBrokerError(wireFormat, dataIn, bs);");
-        }
-        else if (isCachedProperty(property)) {
+        } else if (isCachedProperty(property)) {
             out.println("        info." + propertyName + " = (" + type + ") TightUnmarshalCachedObject(wireFormat, dataIn, bs);");
-        }
-        else {
+        } else {
             out.println("        info." + propertyName + " = (" + type + ") TightUnmarshalNestedObject(wireFormat, dataIn, bs);");
         }
     }
@@ -102,8 +95,7 @@
             out.println("            }");
             out.println("            info." + propertyName + " = value;");
             out.println("        }");
-        }
-        else {
+        } else {
             out.println("        if (bs.ReadBoolean()) {");
             out.println("            short size = dataIn.ReadInt16();");
             out.println("            " + arrayType + "[] value = new " + arrayType + "[size];");
@@ -122,7 +114,7 @@
         List properties = getProperties();
         int baseSize = 0;
         for (Iterator iter = properties.iterator(); iter.hasNext();) {
-            JProperty property = (JProperty) iter.next();
+            JProperty property = (JProperty)iter.next();
             JAnnotation annotation = property.getAnnotation("openwire:property");
             JAnnotationValue size = annotation.getValue("size");
             JClass propertyType = property.getType();
@@ -131,51 +123,38 @@
 
             if (type.equals("boolean")) {
                 out.println("        bs.WriteBoolean(" + getter + ");");
-            }
-            else if (type.equals("byte")) {
+            } else if (type.equals("byte")) {
                 baseSize += 1;
-            }
-            else if (type.equals("char")) {
+            } else if (type.equals("char")) {
                 baseSize += 2;
-            }
-            else if (type.equals("short")) {
+            } else if (type.equals("short")) {
                 baseSize += 2;
-            }
-            else if (type.equals("int")) {
+            } else if (type.equals("int")) {
                 baseSize += 4;
-            }
-            else if (type.equals("long")) {
+            } else if (type.equals("long")) {
                 out.println("        rc += TightMarshalLong1(wireFormat, " + getter + ", bs);");
-            }
-            else if (type.equals("String")) {
+            } else if (type.equals("String")) {
                 out.print("");
                 out.println("        rc += TightMarshalString1(" + getter + ", bs);");
-            }
-            else if (type.equals("byte[]") || type.equals("ByteSequence")) {
+            } else if (type.equals("byte[]") || type.equals("ByteSequence")) {
                 if (size == null) {
                     out.println("        bs.WriteBoolean(" + getter + "!=null);");
                     out.println("        rc += " + getter + "==null ? 0 : " + getter + ".Length+4;");
-                }
-                else {
+                } else {
                     baseSize += size.asInt();
                 }
-            }
-            else if (propertyType.isArrayType()) {
+            } else if (propertyType.isArrayType()) {
                 if (size != null) {
                     out.println("        rc += TightMarshalObjectArrayConstSize1(wireFormat, " + getter + ", bs, " + size.asInt() + ");");
-                }
-                else {
+                } else {
                     out.println("        rc += TightMarshalObjectArray1(wireFormat, " + getter + ", bs);");
                 }
-            }
-            else if (isThrowable(propertyType)) {
+            } else if (isThrowable(propertyType)) {
                 out.println("        rc += TightMarshalBrokerError1(wireFormat, " + getter + ", bs);");
-            }
-            else {
+            } else {
                 if (isCachedProperty(property)) {
                     out.println("        rc += TightMarshalCachedObject1(wireFormat, (DataStructure)" + getter + ", bs);");
-                }
-                else {
+                } else {
                     out.println("        rc += TightMarshalNestedObject1(wireFormat, (DataStructure)" + getter + ", bs);");
                 }
             }
@@ -186,7 +165,7 @@
     protected void generateTightMarshal2Body(PrintWriter out) {
         List properties = getProperties();
         for (Iterator iter = properties.iterator(); iter.hasNext();) {
-            JProperty property = (JProperty) iter.next();
+            JProperty property = (JProperty)iter.next();
             JAnnotation annotation = property.getAnnotation("openwire:property");
             JAnnotationValue size = annotation.getValue("size");
             JClass propertyType = property.getType();
@@ -195,62 +174,49 @@
 
             if (type.equals("boolean")) {
                 out.println("        bs.ReadBoolean();");
-            }
-            else if (type.equals("byte")) {
+            } else if (type.equals("byte")) {
                 out.println("        dataOut.Write(" + getter + ");");
-            }
-            else if (type.equals("char")) {
+            } else if (type.equals("char")) {
                 out.println("        dataOut.Write(" + getter + ");");
-            }
-            else if (type.equals("short")) {
+            } else if (type.equals("short")) {
                 out.println("        dataOut.Write(" + getter + ");");
-            }
-            else if (type.equals("int")) {
+            } else if (type.equals("int")) {
                 out.println("        dataOut.Write(" + getter + ");");
-            }
-            else if (type.equals("long")) {
+            } else if (type.equals("long")) {
                 out.println("        TightMarshalLong2(wireFormat, " + getter + ", dataOut, bs);");
-            }
-            else if (type.equals("String")) {
+            } else if (type.equals("String")) {
                 out.println("        TightMarshalString2(" + getter + ", dataOut, bs);");
-            }
-            else if (type.equals("byte[]") || type.equals("ByteSequence")) {
+            } else if (type.equals("byte[]") || type.equals("ByteSequence")) {
                 if (size != null) {
                     out.println("        dataOut.Write(" + getter + ", 0, " + size.asInt() + ");");
-                }
-                else {
+                } else {
                     out.println("        if(bs.ReadBoolean()) {");
                     out.println("           dataOut.Write(" + getter + ".Length);");
                     out.println("           dataOut.Write(" + getter + ");");
                     out.println("        }");
                 }
-            }
-            else if (propertyType.isArrayType()) {
+            } else if (propertyType.isArrayType()) {
                 if (size != null) {
                     out.println("        TightMarshalObjectArrayConstSize2(wireFormat, " + getter + ", dataOut, bs, " + size.asInt() + ");");
-                }
-                else {
+                } else {
                     out.println("        TightMarshalObjectArray2(wireFormat, " + getter + ", dataOut, bs);");
                 }
-            }
-            else if (isThrowable(propertyType)) {
+            } else if (isThrowable(propertyType)) {
                 out.println("        TightMarshalBrokerError2(wireFormat, " + getter + ", dataOut, bs);");
-            }
-            else {
+            } else {
                 if (isCachedProperty(property)) {
                     out.println("        TightMarshalCachedObject2(wireFormat, (DataStructure)" + getter + ", dataOut, bs);");
-                }
-                else {
+                } else {
                     out.println("        TightMarshalNestedObject2(wireFormat, (DataStructure)" + getter + ", dataOut, bs);");
                 }
             }
         }
     }
-    
-    //////////////////////////////////////////////////////////////////////////////////////
+
+    // ////////////////////////////////////////////////////////////////////////////////////
     // This section is for the loose wire format encoding generator
-    //////////////////////////////////////////////////////////////////////////////////////
-    
+    // ////////////////////////////////////////////////////////////////////////////////////
+
     protected void generateLooseUnmarshalBodyForProperty(PrintWriter out, JProperty property, JAnnotationValue size) {
 
         String propertyName = property.getSimpleName();
@@ -258,40 +224,29 @@
 
         if (type.equals("boolean")) {
             out.println("        info." + propertyName + " = dataIn.ReadBoolean();");
-        }
-        else if (type.equals("byte")) {
+        } else if (type.equals("byte")) {
             out.println("        info." + propertyName + " = dataIn.ReadByte();");
-        }
-        else if (type.equals("char")) {
+        } else if (type.equals("char")) {
             out.println("        info." + propertyName + " = dataIn.ReadChar();");
-        }
-        else if (type.equals("short")) {
+        } else if (type.equals("short")) {
             out.println("        info." + propertyName + " = dataIn.ReadInt16();");
-        }
-        else if (type.equals("int")) {
+        } else if (type.equals("int")) {
             out.println("        info." + propertyName + " = dataIn.ReadInt32();");
-        }
-        else if (type.equals("long")) {
+        } else if (type.equals("long")) {
             out.println("        info." + propertyName + " = LooseUnmarshalLong(wireFormat, dataIn);");
-        }
-        else if (type.equals("String")) {
+        } else if (type.equals("String")) {
             out.println("        info." + propertyName + " = LooseUnmarshalString(dataIn);");
-        }
-        else if (type.equals("byte[]") || type.equals("ByteSequence")) {
+        } else if (type.equals("byte[]") || type.equals("ByteSequence")) {
             if (size != null) {
                 out.println("        info." + propertyName + " = ReadBytes(dataIn, " + size.asInt() + ");");
-            }
-            else {
+            } else {
                 out.println("        info." + propertyName + " = ReadBytes(dataIn, dataIn.ReadBoolean());");
             }
-        }
-        else if (isThrowable(property.getType())) {
+        } else if (isThrowable(property.getType())) {
             out.println("        info." + propertyName + " = LooseUnmarshalBrokerError(wireFormat, dataIn);");
-        }
-        else if (isCachedProperty(property)) {
+        } else if (isCachedProperty(property)) {
             out.println("        info." + propertyName + " = (" + type + ") LooseUnmarshalCachedObject(wireFormat, dataIn);");
-        }
-        else {
+        } else {
             out.println("        info." + propertyName + " = (" + type + ") LooseUnmarshalNestedObject(wireFormat, dataIn);");
         }
     }
@@ -309,8 +264,7 @@
             out.println("            }");
             out.println("            info." + propertyName + " = value;");
             out.println("        }");
-        }
-        else {
+        } else {
             out.println("        if (dataIn.ReadBoolean()) {");
             out.println("            short size = dataIn.ReadInt16();");
             out.println("            " + arrayType + "[] value = new " + arrayType + "[size];");
@@ -325,11 +279,10 @@
         }
     }
 
-
     protected void generateLooseMarshalBody(PrintWriter out) {
         List properties = getProperties();
         for (Iterator iter = properties.iterator(); iter.hasNext();) {
-            JProperty property = (JProperty) iter.next();
+            JProperty property = (JProperty)iter.next();
             JAnnotation annotation = property.getAnnotation("openwire:property");
             JAnnotationValue size = annotation.getValue("size");
             JClass propertyType = property.getType();
@@ -338,304 +291,291 @@
 
             if (type.equals("boolean")) {
                 out.println("        dataOut.Write(" + getter + ");");
-            }
-            else if (type.equals("byte")) {
+            } else if (type.equals("byte")) {
                 out.println("        dataOut.Write(" + getter + ");");
-            }
-            else if (type.equals("char")) {
+            } else if (type.equals("char")) {
                 out.println("        dataOut.Write(" + getter + ");");
-            }
-            else if (type.equals("short")) {
+            } else if (type.equals("short")) {
                 out.println("        dataOut.Write(" + getter + ");");
-            }
-            else if (type.equals("int")) {
+            } else if (type.equals("int")) {
                 out.println("        dataOut.Write(" + getter + ");");
-            }
-            else if (type.equals("long")) {
+            } else if (type.equals("long")) {
                 out.println("        LooseMarshalLong(wireFormat, " + getter + ", dataOut);");
-            }
-            else if (type.equals("String")) {
+            } else if (type.equals("String")) {
                 out.println("        LooseMarshalString(" + getter + ", dataOut);");
-            }
-            else if (type.equals("byte[]") || type.equals("ByteSequence")) {
+            } else if (type.equals("byte[]") || type.equals("ByteSequence")) {
                 if (size != null) {
                     out.println("        dataOut.Write(" + getter + ", 0, " + size.asInt() + ");");
-                }
-                else {
+                } else {
                     out.println("        dataOut.Write(" + getter + "!=null);");
                     out.println("        if(" + getter + "!=null) {");
                     out.println("           dataOut.Write(" + getter + ".Length);");
                     out.println("           dataOut.Write(" + getter + ");");
                     out.println("        }");
                 }
-            }
-            else if (propertyType.isArrayType()) {
+            } else if (propertyType.isArrayType()) {
                 if (size != null) {
                     out.println("        LooseMarshalObjectArrayConstSize(wireFormat, " + getter + ", dataOut, " + size.asInt() + ");");
-                }
-                else {
+                } else {
                     out.println("        LooseMarshalObjectArray(wireFormat, " + getter + ", dataOut);");
                 }
-            }
-            else if (isThrowable(propertyType)) {
+            } else if (isThrowable(propertyType)) {
                 out.println("        LooseMarshalBrokerError(wireFormat, " + getter + ", dataOut);");
-            }
-            else {
+            } else {
                 if (isCachedProperty(property)) {
                     out.println("        LooseMarshalCachedObject(wireFormat, (DataStructure)" + getter + ", dataOut);");
-                }
-                else {
+                } else {
                     out.println("        LooseMarshalNestedObject(wireFormat, (DataStructure)" + getter + ", dataOut);");
                 }
             }
         }
     }
 
-	public String getTargetDir() {
-		return targetDir;
-	}
-
-	public void setTargetDir(String targetDir) {
-		this.targetDir = targetDir;
-	}
-
-	private void generateLicence(PrintWriter out) {
-out.println("/*");
-out.println(" * Licensed to the Apache Software Foundation (ASF) under one or more");
-out.println(" * contributor license agreements.  See the NOTICE file distributed with");
-out.println(" * this work for additional information regarding copyright ownership.");
-out.println(" * The ASF licenses this file to You under the Apache License, Version 2.0");
-out.println(" * (the \"License\"); you may not use this file except in compliance with");
-out.println(" * the License.  You may obtain a copy of the License at");
-out.println(" *");
-out.println(" * http://www.apache.org/licenses/LICENSE-2.0");
-out.println(" *");
-out.println(" * Unless required by applicable law or agreed to in writing, software");
-out.println(" * distributed under the License is distributed on an \"AS IS\" BASIS,");
-out.println(" * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.");
-out.println(" * See the License for the specific language governing permissions and");
-out.println(" * limitations under the License.");
-out.println(" */");
-	}
-
-	protected void generateFile(PrintWriter out) throws Exception {
-		generateLicence(out);
-out.println("");
-out.println("//");
-out.println("// NOTE!: This file is autogenerated - do not modify!");
-out.println("//        if you need to make a change, please see the Groovy scripts in the");
-out.println("//        activemq-core module");
-out.println("//");
-out.println("");
-out.println("using System;");
-out.println("using System.Collections;");
-out.println("using System.IO;");
-out.println("");
-out.println("using ActiveMQ.Commands;");
-out.println("using ActiveMQ.OpenWire;");
-out.println("using ActiveMQ.OpenWire.V"+getOpenwireVersion()+";");
-out.println("");
-out.println("namespace ActiveMQ.OpenWire.V"+getOpenwireVersion()+"");
-out.println("{");
-out.println("  /// <summary>");
-out.println("  ///  Marshalling code for Open Wire Format for "+jclass.getSimpleName()+"");
-out.println("  /// </summary>");
-out.println("  "+getAbstractClassText()+"class "+getClassName()+" : "+getBaseClass()+"");
-out.println("  {");
-
-		if( !isAbstractClass() ) {
-out.println("");
-out.println("");
-out.println("    public override DataStructure CreateObject() ");
-out.println("    {");
-out.println("        return new "+jclass.getSimpleName()+"();");
-out.println("    }");
-out.println("");
-out.println("    public override byte GetDataStructureType() ");
-out.println("    {");
-out.println("        return "+jclass.getSimpleName()+".ID_"+jclass.getSimpleName()+";");
-out.println("    }");
-		}
-
-/*
- * Generate the tight encoding marshallers
- */ 
-out.println("");
-out.println("    // ");
-out.println("    // Un-marshal an object instance from the data input stream");
-out.println("    // ");
-out.println("    public override void TightUnmarshal(OpenWireFormat wireFormat, Object o, BinaryReader dataIn, BooleanStream bs) ");
-out.println("    {");
-out.println("        base.TightUnmarshal(wireFormat, o, dataIn, bs);");
- 
-		if( !getProperties().isEmpty() || isMarshallerAware() ) {
-out.println("");
-out.println("        "+jclass.getSimpleName()+" info = ("+jclass.getSimpleName()+")o;");
-		}
-
-		if( isMarshallerAware() ){
-out.println("");
-out.println("        info.BeforeUnmarshall(wireFormat);");
-out.println("");
-        }
-
-generateTightUnmarshalBody(out);
-
-		if( isMarshallerAware() ){
-out.println("");
-out.println("        info.AfterUnmarshall(wireFormat);");
-		}
-
-out.println("");
-out.println("    }");
-out.println("");
-out.println("    //");
-out.println("    // Write the booleans that this object uses to a BooleanStream");
-out.println("    //");
-out.println("    public override int TightMarshal1(OpenWireFormat wireFormat, Object o, BooleanStream bs) {");
-out.println("        "+jclass.getSimpleName()+" info = ("+jclass.getSimpleName()+")o;");
-
-		if( isMarshallerAware() ) {
-out.println("");
-out.println("        info.BeforeMarshall(wireFormat);");
-		}
-		
-out.println("");
-out.println("        int rc = base.TightMarshal1(wireFormat, info, bs);");
-
-int baseSize = generateTightMarshal1Body(out);
-    
-out.println("");
-out.println("        return rc + "+baseSize+";");
-out.println("    }");
-out.println("");
-out.println("    // ");
-out.println("    // Write a object instance to data output stream");
-out.println("    //");
-out.println("    public override void TightMarshal2(OpenWireFormat wireFormat, Object o, BinaryWriter dataOut, BooleanStream bs) {");
-out.println("        base.TightMarshal2(wireFormat, o, dataOut, bs);");
-
-		if( !getProperties().isEmpty() || isMarshallerAware() ) {
-out.println("");
-out.println("        "+jclass.getSimpleName()+" info = ("+jclass.getSimpleName()+")o;");
-		}
-
-		generateTightMarshal2Body(out);
-
-		if( isMarshallerAware() ) {
-out.println("");
-out.println("        info.AfterMarshall(wireFormat);");
-		}
-		
-out.println("");
-out.println("    }");
-
-out.println("");
-out.println("    // ");
-out.println("    // Un-marshal an object instance from the data input stream");
-out.println("    // ");
-out.println("    public override void LooseUnmarshal(OpenWireFormat wireFormat, Object o, BinaryReader dataIn) ");
-out.println("    {");
-out.println("        base.LooseUnmarshal(wireFormat, o, dataIn);");
- 
-		if( !getProperties().isEmpty() || isMarshallerAware() )  {
-out.println("");
-out.println("        "+jclass.getSimpleName()+" info = ("+jclass.getSimpleName()+")o;");		
-		}
-
-		if( isMarshallerAware() ) {
-out.println("");
-out.println("        info.BeforeUnmarshall(wireFormat);");
-out.println("");
-		}
-
-		generateLooseUnmarshalBody(out);
-
-		if( isMarshallerAware() ) {
-out.println("");
-out.println("        info.AfterUnmarshall(wireFormat);");
-		}
-
-out.println("");
-out.println("    }");
-out.println("");
-out.println("    // ");
-out.println("    // Write a object instance to data output stream");
-out.println("    //");
-out.println("    public override void LooseMarshal(OpenWireFormat wireFormat, Object o, BinaryWriter dataOut) {");
-
-		if( !getProperties().isEmpty() || isMarshallerAware() ) {
-out.println("");
-out.println("        "+jclass.getSimpleName()+" info = ("+jclass.getSimpleName()+")o;");
-		}
-
-		if( isMarshallerAware() ) {
-out.println("");
-out.println("        info.BeforeMarshall(wireFormat);");
-		}
-
-out.println("");
-out.println("        base.LooseMarshal(wireFormat, o, dataOut);");
-
-		generateLooseMarshalBody(out);
-
-		if( isMarshallerAware() ) {
-out.println("");
-out.println("        info.AfterMarshall(wireFormat);");
-		}
-out.println("");
-out.println("    }");
-out.println("  }");
-out.println("}");
-		
-	}
-	
-	
+    public String getTargetDir() {
+        return targetDir;
+    }
+
+    public void setTargetDir(String targetDir) {
+        this.targetDir = targetDir;
+    }
+
+    private void generateLicence(PrintWriter out) {
+        out.println("/**");
+        out.println(" * Licensed to the Apache Software Foundation (ASF) under one or more");
+        out.println(" * contributor license agreements.  See the NOTICE file distributed with");
+        out.println(" * this work for additional information regarding copyright ownership.");
+        out.println(" * The ASF licenses this file to You under the Apache License, Version 2.0");
+        out.println(" * (the \"License\"); you may not use this file except in compliance with");
+        out.println(" * the License.  You may obtain a copy of the License at");
+        out.println(" *");
+        out.println(" *      http://www.apache.org/licenses/LICENSE-2.0");
+        out.println(" *");
+        out.println(" * Unless required by applicable law or agreed to in writing, software");
+        out.println(" * distributed under the License is distributed on an \"AS IS\" BASIS,");
+        out.println(" * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.");
+        out.println(" * See the License for the specific language governing permissions and");
+        out.println(" * limitations under the License.");
+        out.println(" */");
+    }
+
+    protected void generateFile(PrintWriter out) throws Exception {
+        generateLicence(out);
+        out.println("");
+        out.println("//");
+        out.println("// NOTE!: This file is autogenerated - do not modify!");
+        out.println("//        if you need to make a change, please see the Groovy scripts in the");
+        out.println("//        activemq-core module");
+        out.println("//");
+        out.println("");
+        out.println("using System;");
+        out.println("using System.Collections;");
+        out.println("using System.IO;");
+        out.println("");
+        out.println("using ActiveMQ.Commands;");
+        out.println("using ActiveMQ.OpenWire;");
+        out.println("using ActiveMQ.OpenWire.V" + getOpenwireVersion() + ";");
+        out.println("");
+        out.println("namespace ActiveMQ.OpenWire.V" + getOpenwireVersion() + "");
+        out.println("{");
+        out.println("  /// <summary>");
+        out.println("  ///  Marshalling code for Open Wire Format for " + jclass.getSimpleName() + "");
+        out.println("  /// </summary>");
+        out.println("  " + getAbstractClassText() + "class " + getClassName() + " : " + getBaseClass() + "");
+        out.println("  {");
+
+        if (!isAbstractClass()) {
+            out.println("");
+            out.println("");
+            out.println("    public override DataStructure CreateObject() ");
+            out.println("    {");
+            out.println("        return new " + jclass.getSimpleName() + "();");
+            out.println("    }");
+            out.println("");
+            out.println("    public override byte GetDataStructureType() ");
+            out.println("    {");
+            out.println("        return " + jclass.getSimpleName() + ".ID_" + jclass.getSimpleName() + ";");
+            out.println("    }");
+        }
+
+        /*
+         * Generate the tight encoding marshallers
+         */
+        out.println("");
+        out.println("    // ");
+        out.println("    // Un-marshal an object instance from the data input stream");
+        out.println("    // ");
+        out.println("    public override void TightUnmarshal(OpenWireFormat wireFormat, Object o, BinaryReader dataIn, BooleanStream bs) ");
+        out.println("    {");
+        out.println("        base.TightUnmarshal(wireFormat, o, dataIn, bs);");
+
+        if (!getProperties().isEmpty() || isMarshallerAware()) {
+            out.println("");
+            out.println("        " + jclass.getSimpleName() + " info = (" + jclass.getSimpleName() + ")o;");
+        }
+
+        if (isMarshallerAware()) {
+            out.println("");
+            out.println("        info.BeforeUnmarshall(wireFormat);");
+            out.println("");
+        }
+
+        generateTightUnmarshalBody(out);
+
+        if (isMarshallerAware()) {
+            out.println("");
+            out.println("        info.AfterUnmarshall(wireFormat);");
+        }
+
+        out.println("");
+        out.println("    }");
+        out.println("");
+        out.println("    //");
+        out.println("    // Write the booleans that this object uses to a BooleanStream");
+        out.println("    //");
+        out.println("    public override int TightMarshal1(OpenWireFormat wireFormat, Object o, BooleanStream bs) {");
+        out.println("        " + jclass.getSimpleName() + " info = (" + jclass.getSimpleName() + ")o;");
+
+        if (isMarshallerAware()) {
+            out.println("");
+            out.println("        info.BeforeMarshall(wireFormat);");
+        }
+
+        out.println("");
+        out.println("        int rc = base.TightMarshal1(wireFormat, info, bs);");
+
+        int baseSize = generateTightMarshal1Body(out);
+
+        out.println("");
+        out.println("        return rc + " + baseSize + ";");
+        out.println("    }");
+        out.println("");
+        out.println("    // ");
+        out.println("    // Write a object instance to data output stream");
+        out.println("    //");
+        out.println("    public override void TightMarshal2(OpenWireFormat wireFormat, Object o, BinaryWriter dataOut, BooleanStream bs) {");
+        out.println("        base.TightMarshal2(wireFormat, o, dataOut, bs);");
+
+        if (!getProperties().isEmpty() || isMarshallerAware()) {
+            out.println("");
+            out.println("        " + jclass.getSimpleName() + " info = (" + jclass.getSimpleName() + ")o;");
+        }
+
+        generateTightMarshal2Body(out);
+
+        if (isMarshallerAware()) {
+            out.println("");
+            out.println("        info.AfterMarshall(wireFormat);");
+        }
+
+        out.println("");
+        out.println("    }");
+
+        out.println("");
+        out.println("    // ");
+        out.println("    // Un-marshal an object instance from the data input stream");
+        out.println("    // ");
+        out.println("    public override void LooseUnmarshal(OpenWireFormat wireFormat, Object o, BinaryReader dataIn) ");
+        out.println("    {");
+        out.println("        base.LooseUnmarshal(wireFormat, o, dataIn);");
+
+        if (!getProperties().isEmpty() || isMarshallerAware()) {
+            out.println("");
+            out.println("        " + jclass.getSimpleName() + " info = (" + jclass.getSimpleName() + ")o;");
+        }
+
+        if (isMarshallerAware()) {
+            out.println("");
+            out.println("        info.BeforeUnmarshall(wireFormat);");
+            out.println("");
+        }
+
+        generateLooseUnmarshalBody(out);
+
+        if (isMarshallerAware()) {
+            out.println("");
+            out.println("        info.AfterUnmarshall(wireFormat);");
+        }
+
+        out.println("");
+        out.println("    }");
+        out.println("");
+        out.println("    // ");
+        out.println("    // Write a object instance to data output stream");
+        out.println("    //");
+        out.println("    public override void LooseMarshal(OpenWireFormat wireFormat, Object o, BinaryWriter dataOut) {");
+
+        if (!getProperties().isEmpty() || isMarshallerAware()) {
+            out.println("");
+            out.println("        " + jclass.getSimpleName() + " info = (" + jclass.getSimpleName() + ")o;");
+        }
+
+        if (isMarshallerAware()) {
+            out.println("");
+            out.println("        info.BeforeMarshall(wireFormat);");
+        }
+
+        out.println("");
+        out.println("        base.LooseMarshal(wireFormat, o, dataOut);");
+
+        generateLooseMarshalBody(out);
+
+        if (isMarshallerAware()) {
+            out.println("");
+            out.println("        info.AfterMarshall(wireFormat);");
+        }
+        out.println("");
+        out.println("    }");
+        out.println("  }");
+        out.println("}");
+
+    }
+
     public void generateFactory(PrintWriter out) {
-		generateLicence(out);
-out.println("");
-out.println("//");
-out.println("// NOTE!: This file is autogenerated - do not modify!");
-out.println("//        if you need to make a change, please see the Groovy scripts in the");
-out.println("//        activemq-core module");
-out.println("//");
-out.println("");
-out.println("using System;");
-out.println("using System.Collections;");
-out.println("using System.IO;");
-out.println("");
-out.println("using ActiveMQ.Commands;");
-out.println("using ActiveMQ.OpenWire;");
-out.println("using ActiveMQ.OpenWire.V"+getOpenwireVersion()+";");
-out.println("");
-out.println("namespace ActiveMQ.OpenWire.V"+getOpenwireVersion()+"");
-out.println("{");
-out.println("	/// <summary>");
-out.println("	/// Used to create marshallers for a specific version of the wire protocol");
-out.println("	/// </summary>");
-out.println("    public class MarshallerFactory : IMarshallerFactory");
-out.println("    {");
-out.println("        public void configure(OpenWireFormat format) ");
-out.println("        {");
-out.println("            format.clearMarshallers();");
-
-		List list = new ArrayList(getConcreteClasses());
-		Collections.sort(list, new Comparator(){
-			public int compare(Object o1, Object o2) {
-				JClass c1 = (JClass) o1;
-				JClass c2 = (JClass) o2;
-				return c1.getSimpleName().compareTo(c2.getSimpleName());
-			}});
-		
-		for (Iterator iter = list.iterator(); iter.hasNext();) {
-			JClass jclass = (JClass) iter.next();
-out.println("            format.addMarshaller(new "+jclass.getSimpleName()+"Marshaller());");
-	    }        
-
-out.println("");
-out.println("    	}");
-out.println("    }");
-out.println("}");
+        generateLicence(out);
+        out.println("");
+        out.println("//");
+        out.println("// NOTE!: This file is autogenerated - do not modify!");
+        out.println("//        if you need to make a change, please see the Groovy scripts in the");
+        out.println("//        activemq-core module");
+        out.println("//");
+        out.println("");
+        out.println("using System;");
+        out.println("using System.Collections;");
+        out.println("using System.IO;");
+        out.println("");
+        out.println("using ActiveMQ.Commands;");
+        out.println("using ActiveMQ.OpenWire;");
+        out.println("using ActiveMQ.OpenWire.V" + getOpenwireVersion() + ";");
+        out.println("");
+        out.println("namespace ActiveMQ.OpenWire.V" + getOpenwireVersion() + "");
+        out.println("{");
+        out.println("    /// <summary>");
+        out.println("    /// Used to create marshallers for a specific version of the wire protocol");
+        out.println("    /// </summary>");
+        out.println("    public class MarshallerFactory : IMarshallerFactory");
+        out.println("    {");
+        out.println("        public void configure(OpenWireFormat format) ");
+        out.println("        {");
+        out.println("            format.clearMarshallers();");
+
+        List list = new ArrayList(getConcreteClasses());
+        Collections.sort(list, new Comparator() {
+            public int compare(Object o1, Object o2) {
+                JClass c1 = (JClass)o1;
+                JClass c2 = (JClass)o2;
+                return c1.getSimpleName().compareTo(c2.getSimpleName());
+            }
+        });
+
+        for (Iterator iter = list.iterator(); iter.hasNext();) {
+            JClass jclass = (JClass)iter.next();
+            out.println("            format.addMarshaller(new " + jclass.getSimpleName() + "Marshaller());");
+        }
+
+        out.println("");
+        out.println("        }");
+        out.println("    }");
+        out.println("}");
 
-	}	
+    }
 }



Mime
View raw message