Package io.protostuff.runtime
Class RuntimeCollectionField<T,V>
- java.lang.Object
-
- io.protostuff.runtime.Field<T>
-
- io.protostuff.runtime.RuntimeCollectionField<T,V>
-
abstract class RuntimeCollectionField<T,V> extends Field<T>
A runtime field for aCollection
. Null values are not written.
-
-
Field Summary
Fields Modifier and Type Field Description protected CollectionSchema<V>
schema
Since we cannot inherit multiple classes, we create this Collection schema simply to delegate to the wrapping class' abstract methods.
-
Constructor Summary
Constructors Constructor Description RuntimeCollectionField(WireFormat.FieldType type, int number, java.lang.String name, Tag tag, CollectionSchema.MessageFactory messageFactory, boolean allowNullElement)
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description protected abstract void
addValueFrom(Input input, java.util.Collection<V> collection)
protected abstract void
transferValue(Pipe pipe, Input input, Output output, int number, boolean repeated)
protected abstract void
writeValueTo(Output output, int fieldNumber, V value, boolean repeated)
-
-
-
Field Detail
-
schema
protected final CollectionSchema<V> schema
Since we cannot inherit multiple classes, we create this Collection schema simply to delegate to the wrapping class' abstract methods.
-
-
Constructor Detail
-
RuntimeCollectionField
public RuntimeCollectionField(WireFormat.FieldType type, int number, java.lang.String name, Tag tag, CollectionSchema.MessageFactory messageFactory, boolean allowNullElement)
-
-
Method Detail
-
addValueFrom
protected abstract void addValueFrom(Input input, java.util.Collection<V> collection) throws java.io.IOException
- Throws:
java.io.IOException
-
writeValueTo
protected abstract void writeValueTo(Output output, int fieldNumber, V value, boolean repeated) throws java.io.IOException
- Throws:
java.io.IOException
-
-