for (PropertyNode pNode : pList) {
if (shouldSkip(pNode.getName(), excludes, includes)) continue;
first = appendPrefix(cNode, body, result, first, pNode.getName());
String getterName = "get" + Verifier.capitalize(pNode.getName());
Expression getter = new MethodCallExpression(VariableExpression.THIS_EXPRESSION, getterName, MethodCallExpression.NO_ARGUMENTS);
body.addStatement(append(result, new StaticMethodCallExpression(INVOKER_TYPE, "toString", getter)));
}
List<FieldNode> fList = new ArrayList<FieldNode>();
if (includeFields) {
fList.addAll(getInstanceNonPropertyFields(cNode));
}
for (FieldNode fNode : fList) {
if (shouldSkip(fNode.getName(), excludes, includes)) continue;
first = appendPrefix(cNode, body, result, first, fNode.getName());
body.addStatement(append(result, new StaticMethodCallExpression(INVOKER_TYPE, "toString", new VariableExpression(fNode))));
}
if (includeSuper) {
appendPrefix(cNode, body, result, first, "super");
// not through MOP to avoid infinite recursion
body.addStatement(append(result, new MethodCallExpression(VariableExpression.SUPER_EXPRESSION, "toString", MethodCallExpression.NO_ARGUMENTS)));