public void write(DataOutput out) throws IOException {
   out.write(UNION_TYPE);
   out.writeUTF(name);
   out.writeInt(unionTypes.size());
   for (InferredType it : unionTypes) {
     it.write(out);
   }
 }
 public void write(DataOutput out) throws IOException {
   out.write(STRUCT_TYPE);
   out.writeUTF(name);
   out.writeInt(structTypes.size());
   for (InferredType it : structTypes) {
     it.write(out);
   }
 }
 public void write(DataOutput out) throws IOException {
   out.write(ARRAY_TYPE);
   out.writeUTF(name);
   bodyType.write(out);
 }