// See if the type itself declared the method
if (governorHasMethod(methodName)) {
return null;
}
final InvocableMemberBodyBuilder bodyBuilder = new InvocableMemberBodyBuilder();
final String serializer = JSON_SERIALIZER
.getNameIncludingTypeParameters(false,
builder.getImportRegistrationResolver());
final String root = annotationValues.getRootName() != null
&& annotationValues.getRootName().length() > 0 ? ".rootName(\""
+ annotationValues.getRootName() + "\")" : "";
bodyBuilder.appendFormalLine("return new "
+ serializer
+ "()"
+ root);
if (annotationValues.isIso8601Dates()) {
bodyBuilder
.appendFormalLine(".transform("
+ "new flexjson.transformer.DateTransformer"
+ "(\"yyyy-MM-dd\"), java.util.Date.class)");
}
bodyBuilder.appendFormalLine(
(!includeParams ? "" : ".include(fields)")
+ ".exclude(\"*.class\")"
+ (annotationValues.isDeepSerialize() ? ".deepSerialize(this)"
: ".serialize(this)") + ";");