Package com.aerospike.mapper.tools.utils
Class TypeUtils
java.lang.Object
com.aerospike.mapper.tools.utils.TypeUtils
public class TypeUtils extends Object
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static classTypeUtils.AnnotatedType -
Constructor Summary
Constructors Constructor Description TypeUtils() -
Method Summary
Modifier and Type Method Description static TypeMapperaddTypeMapper(Class<?> clazz, TypeMapper mapper)This method adds a new type mapper into the system.static voidclear()static TypeMappergetMapper(Class<?> clazz, TypeUtils.AnnotatedType type, IBaseAeroMapper mapper)static booleanisAerospikeNativeType(Class<?> clazz)static booleanisByteType(Class<?> clazz)static booleanisVoidType(Class<?> clazz)static intreturnTypeToListReturnType(ReturnType returnType)static intreturnTypeToMapReturnType(ReturnType returnType)
-
Constructor Details
-
TypeUtils
public TypeUtils()
-
-
Method Details
-
addTypeMapper
This method adds a new type mapper into the system. This type mapper will replace any other mappers registered for the same class. If there was another mapper for the same type already registered, the old mapper will be replaced with this mapper and the old mapper returned.- Parameters:
clazz- The class to register for the new type mapper.mapper- The new type mapper to create.- Returns:
- Return existing mapper registered for the requested class, null in case there isn't one.
-
getMapper
public static TypeMapper getMapper(Class<?> clazz, TypeUtils.AnnotatedType type, IBaseAeroMapper mapper) -
isByteType
-
isVoidType
-
isAerospikeNativeType
-
clear
public static void clear() -
returnTypeToListReturnType
-
returnTypeToMapReturnType
-