Package io.activej.serializer.impl
Class SerializerDefPrimitive
java.lang.Object
io.activej.serializer.AbstractSerializerDef
io.activej.serializer.impl.SerializerDefPrimitive
- All Implemented Interfaces:
SerializerDef
- Direct Known Subclasses:
SerializerDefBoolean,SerializerDefByte,SerializerDefChar,SerializerDefDouble,SerializerDefFloat,SerializerDefInt,SerializerDefLong,SerializerDefShort
-
Nested Class Summary
Nested classes/interfaces inherited from interface io.activej.serializer.SerializerDef
SerializerDef.StaticDecoders, SerializerDef.StaticEncoders, SerializerDef.Visitor -
Field Summary
Fields -
Constructor Summary
ConstructorsModifierConstructorDescriptionprotectedSerializerDefPrimitive(Class<?> primitiveType, boolean wrapped) -
Method Summary
Modifier and TypeMethodDescriptionprotected booleanfinal Expressiondecoder(SerializerDef.StaticDecoders staticDecoders, Expression in, int version, CompatibilityLevel compatibilityLevel) protected abstract ExpressiondoDeserialize(Expression in, CompatibilityLevel compatibilityLevel) protected abstract ExpressiondoSerialize(Expression byteArray, Variable off, Expression value, CompatibilityLevel compatibilityLevel) final Expressionencoder(SerializerDef.StaticEncoders staticEncoders, Expression buf, Variable pos, Expression value, int version, CompatibilityLevel compatibilityLevel) abstract SerializerDefClass<?>Returns the raw type of object which will be serializedbooleanMethods inherited from class io.activej.serializer.AbstractSerializerDef
accept, getDecodeType, getVersions, isInlineMethods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface io.activej.serializer.SerializerDef
accept, defineDecoder, defineEncoder, getDecodeType, getVersions, isInline
-
Field Details
-
primitiveType
-
wrappedType
-
wrapped
protected final boolean wrapped
-
-
Constructor Details
-
SerializerDefPrimitive
-
-
Method Details
-
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
-
isWrapped
public boolean isWrapped() -
ensureWrapped
-
doSerialize
protected abstract Expression doSerialize(Expression byteArray, Variable off, Expression value, CompatibilityLevel compatibilityLevel) -
doDeserialize
-
castToPrimitive
protected boolean castToPrimitive() -
encoder
public final Expression encoder(SerializerDef.StaticEncoders staticEncoders, Expression buf, Variable pos, Expression value, int version, CompatibilityLevel compatibilityLevel) - Specified by:
encoderin interfaceSerializerDef
-
decoder
public final Expression decoder(SerializerDef.StaticDecoders staticDecoders, Expression in, int version, CompatibilityLevel compatibilityLevel) - Specified by:
decoderin interfaceSerializerDef
-