private static void fieldIsAObjectClass(Map<Integer, Map<String, Object>> mapMain, Field field, Object objectToConvert, Map<String, Object> map, Class<?> type) throws IllegalAccessException { // caso contrario é um obj ou um tipo normal Object obj = field.get(objectToConvert); if (type.isPrimitive() || STOP_CRITERY.contains(type)) { map.put(field.getName(), obj); } else { fieldIsANonPrimitiveObject(mapMain, field, map, type, obj); } }