{
Class<?> paramType = data.getClass();
if (data.equals(Boolean.TRUE))
{
return new NonNestedOutboundVariable("true");
}
else if (data.equals(Boolean.FALSE))
{
return new NonNestedOutboundVariable("false");
}
else if (paramType == Character.class)
{
// Treat characters as strings
return new NonNestedOutboundVariable('\"' + JavascriptUtil.escapeJavaScript(data.toString()) + '\"');
}
else
{
// We just use the default toString for all numbers
return new NonNestedOutboundVariable(data.toString());
}
}