primitive:
if (obj instanceof XmlAnySimpleType)
{
XmlAnySimpleType v = (XmlAnySimpleType)obj;
SchemaType instanceType = ((SimpleValue)v).instanceType();
assert(instanceType != null) : "Nil case should have been handled already";
// handle lists
if (instanceType.getSimpleVariety() == SchemaType.LIST)
{
synchronized (monitor())
{
set_prepare();
set_list(((SimpleValue)v).xgetListValue());
set_commit();
return;
}
}
// handle atomic types
synchronized (monitor())
{
assert(instanceType.getSimpleVariety() == SchemaType.ATOMIC);
switch (instanceType.getPrimitiveType().getBuiltinTypeCode())
{
default:
assert(false) : "encountered nonprimitive type.";
// case SchemaType.BTC_ANY_SIMPLE: This is handled below...
// but we eventually want to handle it with a treecopy, so
// eventually we should break here.
break primitive;
case SchemaType.BTC_BOOLEAN:
{
boolean bool = ((SimpleValue)v).getBooleanValue();
set_prepare();
set_boolean(bool);
break;
}
case SchemaType.BTC_BASE_64_BINARY:
{
byte[] byteArr = ((SimpleValue)v).getByteArrayValue();
set_prepare();
set_b64(byteArr);
break;
}
case SchemaType.BTC_HEX_BINARY:
{
byte[] byteArr = ((SimpleValue)v).getByteArrayValue();
set_prepare();
set_hex(byteArr);
break;
}
case SchemaType.BTC_QNAME:
{
QName name = ((SimpleValue)v).getQNameValue();
set_prepare();
set_QName(name);
break;
}
case SchemaType.BTC_FLOAT:
{
float f = ((SimpleValue)v).getFloatValue();
set_prepare();
set_float(f);
break;
}
case SchemaType.BTC_DOUBLE:
{
double d = ((SimpleValue)v).getDoubleValue();
set_prepare();
set_double(d);
break;
}
case SchemaType.BTC_DECIMAL:
{
switch (instanceType.getDecimalSize())
{
case SchemaType.SIZE_BYTE:
{
byte b = ((SimpleValue)v).getByteValue();
set_prepare();