// Path: hawtbuf-proto/src/main/java/org/fusesource/hawtbuf/proto/WireFormat.java
// public static final int WIRETYPE_FIXED32 = 5;
// 
// Path: hawtbuf-proto/src/main/java/org/fusesource/hawtbuf/proto/WireFormat.java
// public static final int WIRETYPE_FIXED64 = 1;
// 
// Path: hawtbuf-proto/src/main/java/org/fusesource/hawtbuf/proto/WireFormat.java
// public static final int WIRETYPE_LENGTH_DELIMITED = 2;
// 
// Path: hawtbuf-proto/src/main/java/org/fusesource/hawtbuf/proto/WireFormat.java
// public static final int WIRETYPE_VARINT = 0;
// 
// Path: hawtbuf-proto/src/main/java/org/fusesource/hawtbuf/proto/WireFormat.java
// public static int makeTag(int fieldNumber, int wireType) {
//     return (fieldNumber << TAG_TYPE_BITS) | wireType;
// }


import java.util.Map;
import java.util.StringTokenizer;
import org.fusesource.hawtbuf.proto.compiler.parser.ParseException;
import org.fusesource.hawtbuf.proto.compiler.parser.ProtoParser;
import static org.fusesource.hawtbuf.proto.WireFormat.WIRETYPE_FIXED32;
import static org.fusesource.hawtbuf.proto.WireFormat.WIRETYPE_FIXED64;
import static org.fusesource.hawtbuf.proto.WireFormat.WIRETYPE_LENGTH_DELIMITED;
import static org.fusesource.hawtbuf.proto.WireFormat.WIRETYPE_VARINT;
import static org.fusesource.hawtbuf.proto.WireFormat.makeTag;
import java.io.File;
import java.io.FileInputStream;
import java.io.FileNotFoundException;
import java.io.FileOutputStream;
import java.io.PrintWriter;
import java.util.ArrayList;
import java.util.HashSet;
import java.util.LinkedHashMap;
                    if (repeated) {
                        setter = "create" + uname + "List().add";
                    }
                    if (field.getType() == FieldDescriptor.STRING_TYPE) {
                        p("case "
                                + makeTag(field.getTag(),
                                WIRETYPE_LENGTH_DELIMITED) + ":");
                        indent();
                        p(setter + "(input.readString());");
                    } else if (field.getType() == FieldDescriptor.BYTES_TYPE) {
                        p("case " + makeTag(field.getTag(), WIRETYPE_LENGTH_DELIMITED) + ":");
                        indent();
                        String override = getOption(field.getOptions(), "java_override_type", null);
                        if ("AsciiBuffer".equals(override)) {
                            p(setter + "(new org.fusesource.hawtbuf.AsciiBuffer(input.readBytes()));");
                        } else if ("UTF8Buffer".equals(override)) {
                            p(setter + "(new org.fusesource.hawtbuf.UTF8Buffer(input.readBytes()));");
                        } else {
                            p(setter + "(input.readBytes());");
                        }
                    } else if (field.getType() == FieldDescriptor.BOOL_TYPE) {
                        p("case " + makeTag(field.getTag(), WIRETYPE_VARINT) + ":");
                        indent();
                        p(setter + "(input.readBool());");
                    } else if (field.getType() == FieldDescriptor.DOUBLE_TYPE) {
                        p("case " + makeTag(field.getTag(), WIRETYPE_FIXED64)
                                + ":");
                        indent();
                        p(setter + "(input.readDouble());");
                    } else if (field.getType() == FieldDescriptor.FLOAT_TYPE) {
// Path: hawtbuf-proto/src/main/java/org/fusesource/hawtbuf/proto/WireFormat.java
// public static final int WIRETYPE_FIXED32 = 5;
// 
// Path: hawtbuf-proto/src/main/java/org/fusesource/hawtbuf/proto/WireFormat.java
// public static final int WIRETYPE_FIXED64 = 1;
// 
// Path: hawtbuf-proto/src/main/java/org/fusesource/hawtbuf/proto/WireFormat.java
// public static final int WIRETYPE_LENGTH_DELIMITED = 2;
// 
// Path: hawtbuf-proto/src/main/java/org/fusesource/hawtbuf/proto/WireFormat.java
// public static final int WIRETYPE_VARINT = 0;
// 
// Path: hawtbuf-proto/src/main/java/org/fusesource/hawtbuf/proto/WireFormat.java
// public static int makeTag(int fieldNumber, int wireType) {
//     return (fieldNumber << TAG_TYPE_BITS) | wireType;
// }


// Path: hawtbuf-protoc/src/main/java/org/fusesource/hawtbuf/proto/compiler/AltJavaGenerator.java
import java.util.Map;
import java.util.StringTokenizer;
import org.fusesource.hawtbuf.proto.compiler.parser.ParseException;
import org.fusesource.hawtbuf.proto.compiler.parser.ProtoParser;
import static org.fusesource.hawtbuf.proto.WireFormat.WIRETYPE_FIXED32;
import static org.fusesource.hawtbuf.proto.WireFormat.WIRETYPE_FIXED64;
import static org.fusesource.hawtbuf.proto.WireFormat.WIRETYPE_LENGTH_DELIMITED;
import static org.fusesource.hawtbuf.proto.WireFormat.WIRETYPE_VARINT;
import static org.fusesource.hawtbuf.proto.WireFormat.makeTag;
import java.io.File;
import java.io.FileInputStream;
import java.io.FileNotFoundException;
import java.io.FileOutputStream;
import java.io.PrintWriter;
import java.util.ArrayList;
import java.util.HashSet;
import java.util.LinkedHashMap;

                    if (repeated) {
                        setter = "create" + uname + "List().add";
                    }
                    if (field.getType() == FieldDescriptor.STRING_TYPE) {
                        p("case "
                                + makeTag(field.getTag(),
                                WIRETYPE_LENGTH_DELIMITED) + ":");
                        indent();
                        p(setter + "(input.readString());");
                    } else if (field.getType() == FieldDescriptor.BYTES_TYPE) {
                        p("case " + makeTag(field.getTag(), WIRETYPE_LENGTH_DELIMITED) + ":");
                        indent();
                        String override = getOption(field.getOptions(), "java_override_type", null);
                        if ("AsciiBuffer".equals(override)) {
                            p(setter + "(new org.fusesource.hawtbuf.AsciiBuffer(input.readBytes()));");
                        } else if ("UTF8Buffer".equals(override)) {
                            p(setter + "(new org.fusesource.hawtbuf.UTF8Buffer(input.readBytes()));");
                        } else {
                            p(setter + "(input.readBytes());");
                        }
                    } else if (field.getType() == FieldDescriptor.BOOL_TYPE) {
                        p("case " + makeTag(field.getTag(), WIRETYPE_VARINT) + ":");
                        indent();
                        p(setter + "(input.readBool());");
                    } else if (field.getType() == FieldDescriptor.DOUBLE_TYPE) {
                        p("case " + makeTag(field.getTag(), WIRETYPE_FIXED64)
                                + ":");
                        indent();
                        p(setter + "(input.readDouble());");
                    } else if (field.getType() == FieldDescriptor.FLOAT_TYPE) {
                        p("case " + makeTag(field.getTag(), WIRETYPE_FIXED32)