private Type create(boolean entity, Class<?> cl, AnnotationHelper annotationHelper, Annotation annotation, java.lang.reflect.Type genericType,
List<?> key) {
if (cl.isPrimitive()) {
cl = Primitives.wrap(cl);
}
Type value;
Type[] tempParams = (Type[]) Array.newInstance(Type.class,
ReflectionUtils.getTypeParameterCount(genericType));
cache.put(key, new ClassType(cl, tempParams));
Type[] parameters = getParameters(cl, genericType);
if (cl.isArray()) {
Type componentType = get(cl.getComponentType());
if (cl.getComponentType().isPrimitive()) {
componentType = Types.PRIMITIVES.get(componentType);
}
value = componentType.asArrayType();
} else if (cl.isEnum()) {
value = new ClassType(TypeCategory.ENUM, cl);
} else if (Number.class.isAssignableFrom(cl) && Comparable.class.isAssignableFrom(cl)) {
value = new ClassType(TypeCategory.NUMERIC, cl, parameters);
} else if (entity) {