public ClassWriter create(String name, Class<?> clazz, int currentDepth, int paramNameIndex) {
// check if there is a special provided class writer for this type
if(boolean.class.isAssignableFrom(clazz) || Boolean.class.isAssignableFrom(clazz)) {
return new PrimitiveValueWriter(name, clazz, currentDepth, this);
} else if (clazz.isPrimitive()) {
return new PrimitiveValueWriter(name, clazz, currentDepth, this);
} else if (Number.class.isAssignableFrom(clazz)) {
return new PrimitiveValueWriter(name, clazz, currentDepth, this);
} else if (clazz.equals(String.class)) {
return new StringValueWriter(name, clazz, currentDepth, this);
} else if (clazz.isEnum()) {
return new EnumValueWriter(name, clazz, currentDepth, this);
} else if (List.class.isAssignableFrom(clazz)) {