Class ClassConverter
- java.lang.Object
-
- com.oracle.coherence.io.json.internal.ClassConverter
-
- All Implemented Interfaces:
Converter<Class<?>>,Deserializer<Class<?>>,Serializer<Class<?>>
public class ClassConverter extends Object implements Converter<Class<?>>
- Since:
- 20.06
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static classClassConverter.FactoryA factory for creatingClassConverters.
-
Field Summary
Fields Modifier and Type Field Description static ClassConverterINSTANCEThe singleton instance forClassConverter.
-
Constructor Summary
Constructors Modifier Constructor Description protectedClassConverter()Constructs a newClassConverter.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description Class<?>deserialize(ObjectReader reader, Context ctx)voidserialize(Class<?> object, ObjectWriter writer, Context ctx)
-
-
-
Field Detail
-
INSTANCE
public static final ClassConverter INSTANCE
The singleton instance forClassConverter.
-
-
Method Detail
-
serialize
public void serialize(Class<?> object, ObjectWriter writer, Context ctx) throws Exception
- Specified by:
serializein interfaceConverter<Class<?>>- Specified by:
serializein interfaceSerializer<Class<?>>- Parameters:
object- we want to serialize. The object is of type T or a subclass (if this serializer has been registered for subclasses).writer- to use to write data to the output stream.ctx- the current context.- Throws:
JsonBindingExceptionJsonStreamExceptionException
-
deserialize
public Class<?> deserialize(ObjectReader reader, Context ctx) throws Exception
- Specified by:
deserializein interfaceConverter<Class<?>>- Specified by:
deserializein interfaceDeserializer<Class<?>>- Parameters:
reader- used to read data from.ctx- the current context.- Returns:
- an instance of T or a subclass of T.
- Throws:
JsonBindingExceptionJsonStreamExceptionException
-
-