Package kieker.common.record.io
Class AbstractValueDeserializer
java.lang.Object
kieker.common.record.io.AbstractValueDeserializer
- Direct Known Subclasses:
BinaryValueDeserializer,CassandraValueDeserializer,JsonArrayValueDeserializer,TextValueDeserializer
public abstract class AbstractValueDeserializer
extends java.lang.Object
The AbstractValueDeserializer provides common functionality for
IValueDeserializer.
Presently, this is limited to supportive routines to resolve enumeration values.- Since:
- 1.14
- Author:
- Reiner Jung
-
Constructor Summary
Constructors Constructor Description AbstractValueDeserializer()Create an abstract value deserializer. -
Method Summary
Modifier and Type Method Description protected <T extends java.lang.Enum<T>>
TenumerationValueOf(java.lang.Class<T> enumType, int ordinal)Compute the correct enumeration value for the givenenumTypeandordinalvalue.
-
Constructor Details
-
AbstractValueDeserializer
public AbstractValueDeserializer()Create an abstract value deserializer.
-
-
Method Details
-
enumerationValueOf
protected <T extends java.lang.Enum<T>> T enumerationValueOf(java.lang.Class<T> enumType, int ordinal) throws RecordInstantiationExceptionCompute the correct enumeration value for the givenenumTypeandordinalvalue.- Type Parameters:
T- enumeration type- Parameters:
enumType- class type referring to an enumeration typeordinal- the ordinal number of an element of the enumeration type- Returns:
- returns an enumeration value
- Throws:
RecordInstantiationException- in case the ordinal value does not specify an element of the specified enumeration
-