// Compute the names of the mutators that will be produced
for (final FieldMetadataBuilder field : fields) {
final JavaSymbolName requiredMutatorName = BeanInfoUtils
.getMutatorMethodName(field.getFieldName());
final JavaType parameterType = field.getFieldType();
final MethodMetadata mutator = getGovernorMethod(
requiredMutatorName, parameterType);
if (mutator == null) {
mutators.add(getMutatorMethod(field.getFieldName(),
field.getFieldType()));
}
else {
Validate.isTrue(
Modifier.isPublic(mutator.getModifier()),
"User provided field but failed to provide a public '%s(%s)' method in '%s'",
requiredMutatorName.getSymbolName(), field
.getFieldName().getSymbolName(), destination
.getFullyQualifiedTypeName());
mutators.add(new MethodMetadataBuilder(mutator));