}
private FieldInfo[] mapFields(ReflectField[] fields) {
FieldInfo[] fieldsMeta = new FieldInfo[fields.length];
for (int i = 0; i < fields.length; ++i) {
final ReflectField field = fields[i];
boolean isArray = field.getFieldType().isArray();
ReflectClass fieldClass = isArray ? field.getFieldType().getComponentType() : field.getFieldType();
boolean isPrimitive = fieldClass.isPrimitive();
// TODO: need to handle NArray, currently it ignores NArray and alway sets NArray flag false.
fieldsMeta[i] = new FieldInfo(field.getName(), getClassMeta(fieldClass), isPrimitive, isArray, false);
}
return fieldsMeta;
}