Class RuntimeCollectionField<T,V>
java.lang.Object
io.protostuff.runtime.Field<T>
io.protostuff.runtime.RuntimeCollectionField<T,V>
A runtime field for a
Collection. Null values are not written.-
Field Summary
FieldsModifier and TypeFieldDescriptionprotected final CollectionSchema<V> Since we cannot inherit multiple classes, we create this Collection schema simply to delegate to the wrapping class' abstract methods. -
Constructor Summary
ConstructorsConstructorDescriptionRuntimeCollectionField(WireFormat.FieldType type, int number, String name, Tag tag, CollectionSchema.MessageFactory messageFactory, boolean allowNullElement) -
Method Summary
Modifier and TypeMethodDescriptionprotected abstract voidaddValueFrom(Input input, Collection<V> collection) protected abstract voidtransferValue(Pipe pipe, Input input, Output output, int number, boolean repeated) protected abstract voidwriteValueTo(Output output, int fieldNumber, V value, boolean repeated)
-
Field Details
-
schema
Since we cannot inherit multiple classes, we create this Collection schema simply to delegate to the wrapping class' abstract methods.
-
-
Constructor Details
-
RuntimeCollectionField
public RuntimeCollectionField(WireFormat.FieldType type, int number, String name, Tag tag, CollectionSchema.MessageFactory messageFactory, boolean allowNullElement)
-
-
Method Details
-
addValueFrom
- Throws:
IOException
-
writeValueTo
protected abstract void writeValueTo(Output output, int fieldNumber, V value, boolean repeated) throws IOException - Throws:
IOException
-
transferValue
protected abstract void transferValue(Pipe pipe, Input input, Output output, int number, boolean repeated) throws IOException - Throws:
IOException
-