package io.protostuff.runtime;
import static io.protostuff.runtime.RuntimeFieldFactory.BIGDECIMAL;
import static io.protostuff.runtime.RuntimeFieldFactory.BIGINTEGER;
import static io.protostuff.runtime.RuntimeFieldFactory.BOOL;
import static io.protostuff.runtime.RuntimeFieldFactory.BYTE;
import static io.protostuff.runtime.RuntimeFieldFactory.BYTES;
import static io.protostuff.runtime.RuntimeFieldFactory.BYTE_ARRAY;
import static io.protostuff.runtime.RuntimeFieldFactory.CHAR;
import static io.protostuff.runtime.RuntimeFieldFactory.DATE;
import static io.protostuff.runtime.RuntimeFieldFactory.DOUBLE;
import static io.protostuff.runtime.RuntimeFieldFactory.FLOAT;
import static io.protostuff.runtime.RuntimeFieldFactory.ID_ARRAY;
import static io.protostuff.runtime.RuntimeFieldFactory.ID_ARRAY_DELEGATE;
import static io.protostuff.runtime.RuntimeFieldFactory.ID_ARRAY_ENUM;
import static io.protostuff.runtime.RuntimeFieldFactory.ID_ARRAY_MAPPED;
import static io.protostuff.runtime.RuntimeFieldFactory.ID_ARRAY_POJO;
import static io.protostuff.runtime.RuntimeFieldFactory.ID_ARRAY_SCALAR;
import static io.protostuff.runtime.RuntimeFieldFactory.ID_BIGDECIMAL;
import static io.protostuff.runtime.RuntimeFieldFactory.ID_BIGINTEGER;
import static io.protostuff.runtime.RuntimeFieldFactory.ID_BOOL;
import static io.protostuff.runtime.RuntimeFieldFactory.ID_BYTE;
import static io.protostuff.runtime.RuntimeFieldFactory.ID_BYTES;
import static io.protostuff.runtime.RuntimeFieldFactory.ID_BYTE_ARRAY;
import static io.protostuff.runtime.RuntimeFieldFactory.ID_CHAR;
import static io.protostuff.runtime.RuntimeFieldFactory.ID_CLASS;
import static io.protostuff.runtime.RuntimeFieldFactory.ID_CLASS_ARRAY;
import static io.protostuff.runtime.RuntimeFieldFactory.ID_CLASS_ARRAY_MAPPED;
import static io.protostuff.runtime.RuntimeFieldFactory.ID_CLASS_MAPPED;
import static io.protostuff.runtime.RuntimeFieldFactory.ID_COLLECTION;
import static io.protostuff.runtime.RuntimeFieldFactory.ID_DATE;
import static io.protostuff.runtime.RuntimeFieldFactory.ID_DELEGATE;
import static io.protostuff.runtime.RuntimeFieldFactory.ID_DOUBLE;
import static io.protostuff.runtime.RuntimeFieldFactory.ID_ENUM;
import static io.protostuff.runtime.RuntimeFieldFactory.ID_ENUM_MAP;
import static io.protostuff.runtime.RuntimeFieldFactory.ID_ENUM_SET;
import static io.protostuff.runtime.RuntimeFieldFactory.ID_FLOAT;
import static io.protostuff.runtime.RuntimeFieldFactory.ID_INT32;
import static io.protostuff.runtime.RuntimeFieldFactory.ID_INT64;
import static io.protostuff.runtime.RuntimeFieldFactory.ID_MAP;
import static io.protostuff.runtime.RuntimeFieldFactory.ID_OBJECT;
import static io.protostuff.runtime.RuntimeFieldFactory.ID_POJO;
import static io.protostuff.runtime.RuntimeFieldFactory.ID_POLYMORPHIC_COLLECTION;
import static io.protostuff.runtime.RuntimeFieldFactory.ID_POLYMORPHIC_MAP;
import static io.protostuff.runtime.RuntimeFieldFactory.ID_SHORT;
import static io.protostuff.runtime.RuntimeFieldFactory.ID_STRING;
import static io.protostuff.runtime.RuntimeFieldFactory.ID_THROWABLE;
import static io.protostuff.runtime.RuntimeFieldFactory.INT32;
import static io.protostuff.runtime.RuntimeFieldFactory.INT64;
import static io.protostuff.runtime.RuntimeFieldFactory.SHORT;
import static io.protostuff.runtime.RuntimeFieldFactory.STRING;
import static io.protostuff.runtime.RuntimeFieldFactory.STR_ARRAY;
import static io.protostuff.runtime.RuntimeFieldFactory.STR_ARRAY_DELEGATE;
import static io.protostuff.runtime.RuntimeFieldFactory.STR_ARRAY_ENUM;
import static io.protostuff.runtime.RuntimeFieldFactory.STR_ARRAY_MAPPED;
import static io.protostuff.runtime.RuntimeFieldFactory.STR_ARRAY_POJO;
import static io.protostuff.runtime.RuntimeFieldFactory.STR_ARRAY_SCALAR;
import static io.protostuff.runtime.RuntimeFieldFactory.STR_BIGDECIMAL;
import static io.protostuff.runtime.RuntimeFieldFactory.STR_BIGINTEGER;
import static io.protostuff.runtime.RuntimeFieldFactory.STR_BOOL;
import static io.protostuff.runtime.RuntimeFieldFactory.STR_BYTE;
import static io.protostuff.runtime.RuntimeFieldFactory.STR_BYTES;
import static io.protostuff.runtime.RuntimeFieldFactory.STR_BYTE_ARRAY;
import static io.protostuff.runtime.RuntimeFieldFactory.STR_CHAR;
import static io.protostuff.runtime.RuntimeFieldFactory.STR_CLASS;
import static io.protostuff.runtime.RuntimeFieldFactory.STR_CLASS_ARRAY;
import static io.protostuff.runtime.RuntimeFieldFactory.STR_CLASS_ARRAY_MAPPED;
import static io.protostuff.runtime.RuntimeFieldFactory.STR_CLASS_MAPPED;
import static io.protostuff.runtime.RuntimeFieldFactory.STR_COLLECTION;
import static io.protostuff.runtime.RuntimeFieldFactory.STR_DATE;
import static io.protostuff.runtime.RuntimeFieldFactory.STR_DELEGATE;
import static io.protostuff.runtime.RuntimeFieldFactory.STR_DOUBLE;
import static io.protostuff.runtime.RuntimeFieldFactory.STR_ENUM;
import static io.protostuff.runtime.RuntimeFieldFactory.STR_ENUM_MAP;
import static io.protostuff.runtime.RuntimeFieldFactory.STR_ENUM_SET;
import static io.protostuff.runtime.RuntimeFieldFactory.STR_FLOAT;
import static io.protostuff.runtime.RuntimeFieldFactory.STR_INT32;
import static io.protostuff.runtime.RuntimeFieldFactory.STR_INT64;
import static io.protostuff.runtime.RuntimeFieldFactory.STR_MAP;
import static io.protostuff.runtime.RuntimeFieldFactory.STR_OBJECT;
import static io.protostuff.runtime.RuntimeFieldFactory.STR_POJO;
import static io.protostuff.runtime.RuntimeFieldFactory.STR_POLYMOPRHIC_MAP;
import static io.protostuff.runtime.RuntimeFieldFactory.STR_POLYMORPHIC_COLLECTION;
import static io.protostuff.runtime.RuntimeFieldFactory.STR_SHORT;
import static io.protostuff.runtime.RuntimeFieldFactory.STR_STRING;
import static io.protostuff.runtime.RuntimeFieldFactory.STR_THROWABLE;
A schema for dynamic types (fields where the type is
java.lang.Object
).
- Author(s):
- David Yu
- Created:
- Feb 1, 2011
final int[] arg = new int[dimensions];
Pipe.Schema<?> pipeSchema, boolean mapped, boolean array,
final int[] arg = new int[dimensions];
strategy.COLLECTION_SCHEMA.mergeFrom(input, arrayWrapper);
return arrayWrapper.array;
strategy.COLLECTION_SCHEMA.mergeFrom(input, mArrayWrapper);
return mArrayWrapper.array;
strategy.COLLECTION_SCHEMA.mergeFrom(input, collection);
strategy.POLYMORPHIC_COLLECTION_SCHEMA, owner, strategy);
strategy.POLYMORPHIC_MAP_SCHEMA, owner, strategy);
return hd.genericElementSchema.readFrom(input, owner);
return arraySchema.readFrom(input, owner);
return eio.genericElementSchema.readFrom(input, owner);
return hs.genericElementSchema.readFrom(input, owner);
return PolymorphicThrowableSchema.readObjectFrom(input, schema, owner,
hd.delegate.writeTo(output, 1, value, false);
inline.writeTo(output, inline.id, value, false);
hdArray.genericElementSchema.writeTo(output, value);
inlineArray.id, primitive);
ArraySchemas.toArrayId(inlineArray.id, primitive),
arraySchema.writeTo(output, value);
eio.genericElementSchema.writeTo(output, value);
hs.genericElementSchema.writeTo(output, value);
strategy.ARRAY_SCHEMA.writeTo(output, value);
strategy.POLYMORPHIC_MAP_SCHEMA, currentSchema);
strategy.POLYMORPHIC_MAP_SCHEMA, strategy);
strategy.POLYMORPHIC_COLLECTION_SCHEMA, currentSchema);
strategy.POLYMORPHIC_COLLECTION_SCHEMA, strategy);
PolymorphicThrowableSchema.writeObjectTo(output, value, currentSchema,
transferArray(pipe, input, output, number, pipeSchema, false, strategy);
transferArray(pipe, input, output, number, pipeSchema, true, strategy);
transferClass(pipe, input, output, number, pipeSchema, false, false, strategy);
transferClass(pipe, input, output, number, pipeSchema, true, false, strategy);
transferClass(pipe, input, output, number, pipeSchema, false, true, strategy);
transferClass(pipe, input, output, number, pipeSchema, true, true, strategy);
EnumIO.transfer(pipe, input, output, 1, false);
Pipe.transferDirect(strategy.COLLECTION_PIPE_SCHEMA, pipe, input, output);