final ClassOrInterfaceTypeDetails simpleInterfaceDetails = typeParsingService
.getTypeFromString(fileContents, SIMPLE_CLASS3_DECLARED_BY_MID,
SIMPLE_CLASS3_TYPE);
final SetField fieldDetails = new SetField(
SIMPLE_CLASS3_DECLARED_BY_MID, new JavaType(
SET.getFullyQualifiedTypeName(), 0, DataType.TYPE,
null, Arrays.asList(SIMPLE_CLASS3_TYPE)),
new JavaSymbolName("children"), SIMPLE_CLASS3_TYPE,
Cardinality.ONE_TO_MANY);
final FieldMetadataBuilder fieldBuilder = new FieldMetadataBuilder(
fieldDetails.getPhysicalTypeIdentifier(), Modifier.PRIVATE,
new ArrayList<AnnotationMetadataBuilder>(),
fieldDetails.getFieldName(), fieldDetails.getFieldType());
fieldBuilder.setFieldInitializer("new HashSet<SimpleClass3>()");
final ClassOrInterfaceTypeDetails newClassDetails = addField(
simpleInterfaceDetails, fieldBuilder.build());