jsonObjectParameter.setFinal(true);
jsonObjectParameter.setName(Constants.WRITE_FIELD_JSON_OBJECT_PARAMETER);
final Type jsonObjectType = this.getJsonObject();
jsonObjectParameter.setType(jsonObjectType);
final WriteFieldsTemplatedFile body = new WriteFieldsTemplatedFile();
body.setInstanceType(type);
writeFields.setBody(body);
// find all fields belonging to type
final Iterator fields = type.getFields().iterator();
while (fields.hasNext()) {
final Field field = (Field) fields.next();
if (field.isStatic() || field.isTransient()) {
continue;
}
final NewMethod fieldGetter = this.createFieldGetter(deserializer, field);
final String javascriptPropertyName = this.getJavascriptPropertyName(field);
final Type serializer = this.getSerializer(field);
body.addField(javascriptPropertyName, fieldGetter, serializer);
} // while
context.unbranch();
}