resultField,
LiteralWrapper.NULL)
;
JavaStatement thenStatement =
new ReturnStatement(
new MethodInvocation.Instance(
null,
"debug_getChildPrefixText",
JavaTypeNames.RTFULLAPP,
new JavaExpression[]{childNVar},
new JavaTypeName[]{JavaTypeName.INT},
JavaTypeName.STRING,
MethodInvocation.InvocationType.SPECIAL));
JavaStatement.IfThenElseStatement ifThenStatement =
new JavaStatement.IfThenElseStatement (conditionExpr, thenStatement);
method.addStatement(ifThenStatement);
}
{
// if (childN >= 0 && childN < 2) {
// return " ";
// }
JavaExpression conditionExpr =
new OperatorExpression.Binary(
JavaOperator.CONDITIONAL_AND,
new OperatorExpression.Binary(
JavaOperator.GREATER_THAN_EQUALS_INT,
childNVar,
LiteralWrapper.make(Integer.valueOf(0))),
new OperatorExpression.Binary(
JavaOperator.LESS_THAN_INT,
childNVar,
LiteralWrapper.make(Integer.valueOf(memberFields.length))));
JavaStatement thenStatement =
new ReturnStatement(LiteralWrapper.make(" "));
JavaStatement.IfThenElseStatement ifThenStatement =
new JavaStatement.IfThenElseStatement (conditionExpr, thenStatement);
method.addStatement(ifThenStatement);