@@ -0,0 +1,1986 @@
+// Copyright 2014 Square, Inc.%0Apackage com.squareup.protoparser;%0A%0Aimport java.util.LinkedHashSet;%0Aimport java.util.Set;%0A%0Aimport static java.util.Collections.unmodifiableSet;%0A%0A/** Utilities for dealing with scalar types. */%0Apublic final class ScalarTypes %7B%0A  private static final Set%3CString%3E SCALAR_TYPES;%0A%0A  public static final String TYPE_BOOL = %22bool%22;%0A  public static final String TYPE_BYTES = %22bytes%22;%0A  public static final String TYPE_DOUBLE = %22double%22;%0A  public static final String TYPE_FLOAT = %22float%22;%0A  public static final String TYPE_FIXED_32 = %22fixed32%22;%0A  public static final String TYPE_FIXED_64 = %22fixed64%22;%0A  public static final String TYPE_INT_32 = %22int32%22;%0A  public static final String TYPE_INT_64 = %22int64%22;%0A  public static final String TYPE_SFIXED_32 = %22sfixed32%22;%0A  public static final String TYPE_SFIXED_64 = %22sfixed64%22;%0A  public static final String TYPE_SINT_32 = %22sint32%22;%0A  public static final String TYPE_SINT_64 = %22sint64%22;%0A  public static final String TYPE_STRING = %22string%22;%0A  public static final String TYPE_UINT_32 = %22uint32%22;%0A  public static final String TYPE_UINT_64 = %22uint64%22;%0A%0A  static %7B%0A    Set%3CString%3E scalarTypes = new LinkedHashSet%3CString%3E();%0A    scalarTypes.add(TYPE_BOOL);%0A    scalarTypes.add(TYPE_BYTES);%0A    scalarTypes.add(TYPE_DOUBLE);%0A    scalarTypes.add(TYPE_FLOAT);%0A    scalarTypes.add(TYPE_FIXED_32);%0A    scalarTypes.add(TYPE_FIXED_64);%0A    scalarTypes.add(TYPE_INT_32);%0A    scalarTypes.add(TYPE_INT_64);%0A    scalarTypes.add(TYPE_SFIXED_32);%0A    scalarTypes.add(TYPE_SFIXED_64);%0A    scalarTypes.add(TYPE_SINT_32);%0A    scalarTypes.add(TYPE_SINT_64);%0A    scalarTypes.add(TYPE_STRING);%0A    scalarTypes.add(TYPE_UINT_32);%0A    scalarTypes.add(TYPE_UINT_64);%0A    SCALAR_TYPES = unmodifiableSet(scalarTypes);%0A  %7D%0A%0A  /** Returns true if the supplied type is scalar. */%0A  public static boolean isScalarType(String type) %7B%0A    return SCALAR_TYPES.contains(type);%0A  %7D%0A%0A  private ScalarTypes() %7B%0A    throw new AssertionError(%22No instances.%22);%0A  %7D%0A%7D%0A

Add util class for scalar types.