Class FieldSerializerGenericsUtil
java.lang.Object
com.esotericsoftware.kryo.serializers.FieldSerializerGenericsUtil
A few utility methods for using generic type parameters, mostly by FieldSerializer
-
Field Summary
Fields -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescription(package private) GenericsbuildGenericsScope(Class clazz, Class[] generics) Create a mapping from type variable names (which are declared as type parameters of a generic class) to the concrete classes used for type instantiation.(package private) Class[]computeFieldGenerics(Type fieldGenericType, Field field, Class[] fieldClass) static Class[]getGenerics(Type genericType, Kryo kryo) Returns the first level of classes or interfaces for a generic type.private Class<?> getTypeVarConcreteClass(Class[] generics, int typeVarNum, String typeVarName) (package private) FieldSerializer.CachedFieldnewCachedFieldOfGenericType(Field field, int accessIndex, Class[] fieldClass, Type fieldGenericType) Special processing for fiels of generic types
-
Field Details
-
kryo
-
serializer
-
-
Constructor Details
-
FieldSerializerGenericsUtil
-
-
Method Details
-
buildGenericsScope
Create a mapping from type variable names (which are declared as type parameters of a generic class) to the concrete classes used for type instantiation.- Parameters:
clazz- class with generic type argumentsgenerics- concrete types used to instantiate the class- Returns:
- new scope for type parameters
-
getTypeVarConcreteClass
-
computeFieldGenerics
-
newCachedFieldOfGenericType
FieldSerializer.CachedField newCachedFieldOfGenericType(Field field, int accessIndex, Class[] fieldClass, Type fieldGenericType) Special processing for fiels of generic types -
getGenerics
-