if (needsCodec(fieldMetadata)) {
ThriftCodec<?> codec = codecManager.getCodec(fieldMetadata.getThriftType());
String fieldName = fieldMetadata.getName() + "Codec";
FieldDefinition codecField = new FieldDefinition(a(PRIVATE, FINAL), fieldName, type(codec.getClass()));
classDefinition.addField(codecField);
codecFields.put(fieldMetadata.getId(), codecField);
parameters.add(codecField, codec);
}