if (actualType instanceof Class)
generics[i] = (Class)actualType;
else if (actualType instanceof ParameterizedType)
generics[i] = (Class)((ParameterizedType)actualType).getRawType();
else if (actualType instanceof TypeVariable) {
Generics scope = kryo.getGenericsScope();
if (scope != null) {
Class clazz = scope.getConcreteClass(((TypeVariable)actualType).getName());
if (clazz != null) {
generics[i] = clazz;
} else
continue;
} else
continue;
} else if (actualType instanceof GenericArrayType) {
Type componentType = ((GenericArrayType)actualType).getGenericComponentType();
if (componentType instanceof Class)
generics[i] = Array.newInstance((Class)componentType, 0).getClass();
else if (componentType instanceof TypeVariable) {
Generics scope = kryo.getGenericsScope();
if (scope != null) {
Class clazz = scope.getConcreteClass(((TypeVariable)componentType).getName());
if (clazz != null) {
generics[i] = Array.newInstance(clazz, 0).getClass();
}
}
} else {