}
write.switchStatement("default-write", cases);
// write fields
for (ThriftFieldMetadata field : metadata.getFields(THRIFT_FIELD)) {
write.visitLabel(field.getName() + "-write-field");
writeField(write, protocol, field);
write.gotoLabel("default-write");
}
write.visitLabel("default-write")