Package io.activej.serializer.impl
Class AbstractSerializerDefCollection
java.lang.Object
io.activej.serializer.AbstractSerializerDef
io.activej.serializer.impl.AbstractSerializerDefCollection
- All Implemented Interfaces:
SerializerDefWithNullable,SerializerDef
- Direct Known Subclasses:
SerializerDefRegularCollection
public abstract class AbstractSerializerDefCollection
extends AbstractSerializerDef
implements SerializerDefWithNullable
-
Nested Class Summary
Nested classes/interfaces inherited from interface io.activej.serializer.SerializerDef
SerializerDef.StaticDecoders, SerializerDef.StaticEncoders, SerializerDef.Visitor -
Field Summary
FieldsModifier and TypeFieldDescriptionprotected final Class<?>protected final Class<?>protected final Class<?>protected final booleanprotected final SerializerDef -
Constructor Summary
ConstructorsModifierConstructorDescriptionprotectedAbstractSerializerDefCollection(@NotNull SerializerDef valueSerializer, @NotNull Class<?> encodeType, @NotNull Class<?> decodeType, @NotNull Class<?> elementType, boolean nullable) -
Method Summary
Modifier and TypeMethodDescriptionvoidaccept(SerializerDef.Visitor visitor) protected abstract @NotNull ExpressionaddToBuilder(Expression builder, Expression index, Expression element) protected abstract @NotNull Expressionbuild(Expression builder) protected abstract @NotNull ExpressioncreateBuilder(Expression length) final Expressiondecoder(SerializerDef.StaticDecoders staticDecoders, Expression in, int version, CompatibilityLevel compatibilityLevel) protected @NotNull ExpressiondoDecode(SerializerDef.StaticDecoders staticDecoders, Expression in, int version, CompatibilityLevel compatibilityLevel, Expression length) protected @NotNull ExpressiondoEncode(SerializerDef.StaticEncoders staticEncoders, Expression buf, Variable pos, Expression value, int version, CompatibilityLevel compatibilityLevel) protected abstract @NotNull SerializerDefdoEnsureNullable(CompatibilityLevel compatibilityLevel) protected abstract @NotNull ExpressiondoIterate(Expression collection, UnaryOperator<Expression> action) final Expressionencoder(SerializerDef.StaticEncoders staticEncoders, Expression buf, Variable pos, Expression value, int version, CompatibilityLevel compatibilityLevel) final SerializerDefensureNullable(CompatibilityLevel compatibilityLevel) Class<?>Class<?>Returns the raw type of object which will be serializedbooleanisInline(int version, CompatibilityLevel compatibilityLevel) Methods inherited from class io.activej.serializer.AbstractSerializerDef
getVersionsMethods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface io.activej.serializer.SerializerDef
defineDecoder, defineEncoder, getVersions
-
Field Details
-
valueSerializer
-
encodeType
-
decodeType
-
elementType
-
nullable
protected final boolean nullable
-
-
Constructor Details
-
AbstractSerializerDefCollection
protected AbstractSerializerDefCollection(@NotNull @NotNull SerializerDef valueSerializer, @NotNull @NotNull Class<?> encodeType, @NotNull @NotNull Class<?> decodeType, @NotNull @NotNull Class<?> elementType, boolean nullable)
-
-
Method Details
-
accept
- Specified by:
acceptin interfaceSerializerDef- Overrides:
acceptin classAbstractSerializerDef
-
isInline
- Specified by:
isInlinein interfaceSerializerDef- Overrides:
isInlinein classAbstractSerializerDef
-
getEncodeType
Description copied from interface:SerializerDefReturns the raw type of object which will be serialized- Specified by:
getEncodeTypein interfaceSerializerDef- Returns:
- type of object which will be serialized
-
getDecodeType
- Specified by:
getDecodeTypein interfaceSerializerDef- Overrides:
getDecodeTypein classAbstractSerializerDef
-
ensureNullable
- Specified by:
ensureNullablein interfaceSerializerDefWithNullable
-
encoder
public final Expression encoder(SerializerDef.StaticEncoders staticEncoders, Expression buf, Variable pos, Expression value, int version, CompatibilityLevel compatibilityLevel) - Specified by:
encoderin interfaceSerializerDef
-
doEncode
@NotNull protected @NotNull Expression doEncode(SerializerDef.StaticEncoders staticEncoders, Expression buf, Variable pos, Expression value, int version, CompatibilityLevel compatibilityLevel) -
decoder
public final Expression decoder(SerializerDef.StaticDecoders staticDecoders, Expression in, int version, CompatibilityLevel compatibilityLevel) - Specified by:
decoderin interfaceSerializerDef
-
doDecode
@NotNull protected @NotNull Expression doDecode(SerializerDef.StaticDecoders staticDecoders, Expression in, int version, CompatibilityLevel compatibilityLevel, Expression length) -
doEnsureNullable
@NotNull protected abstract @NotNull SerializerDef doEnsureNullable(CompatibilityLevel compatibilityLevel) -
doIterate
@NotNull protected abstract @NotNull Expression doIterate(Expression collection, UnaryOperator<Expression> action) -
createBuilder
-
addToBuilder
@NotNull protected abstract @NotNull Expression addToBuilder(Expression builder, Expression index, Expression element) -
build
-