out.append(']');
return;
}
GenericConverterFactory converter =
GenericConverterFactory.getCurrentInstance();
if (Byte.class == valueClass)
{
writeByte(out, ((Byte)attrValue).byteValue());
}
else if (converter.isConvertible(attrValue, Date.class))
{
Date date = (Date) converter.convert(attrValue, Date.class);
writeDate(out, date);
}
else if (Double.class == valueClass)
{
writeDouble(out, ((Double)attrValue).doubleValue());
}
else if (Float.class == valueClass)
{
writeFloat(out, ((Float)attrValue).floatValue());
}
else if (Long.class == valueClass)
{
writeLong(out, ((Long)attrValue).longValue());
}
else if (Short.class == valueClass)
{
writeShort(out, ((Short)attrValue).shortValue());
}
else if (converter.isConvertible(attrValue, Number.class))
{
Number num = (Number) converter.convert(attrValue, Number.class);
writeDouble(out, num.doubleValue());
}
else if (Map.class.isAssignableFrom(valueClass))
{
writeMap(out, ((Map)attrValue), escapeXML);