当前行做为标题行

@param currentFields 当前行字段列表
771984
private void initHeader(final List<String> currentFields) {
		final Map<String, Integer> localHeaderMap = new LinkedHashMap<>(currentFields.size());
		for (int i = 0; i < currentFields.size(); i++) {
			final String field = currentFields.get(i);
			if (StrUtil.isNotEmpty(field) && false ==localHeaderMap.containsKey(field)) {
				localHeaderMap.put(field, i);
			}
		}
		
		header = new CsvRow(this.lineNo, Collections.unmodifiableMap(localHeaderMap),  Collections.unmodifiableList(currentFields));
	}
44760
private void populateCurrentKeyValue() throws IOException, InterruptedException {
    currentKey = delegateReader.getCurrentKey();
    currentValue = delegateReader.getCurrentValue();
    ++recordsRead;
  }
274307
protected void run(Scanner scanner) {
        String currentProfileName = null;

        try {
            while(scanner.hasNextLine()) {
                String line = scanner.nextLine().trim();

                // Empty or comment lines
                if (line.isEmpty() || line.startsWith("#")) {
                    onEmptyOrCommentLine(currentProfileName, line);
                    continue;
                }

                // parseGroupName returns null if this line does not
                // indicate a new property group.
                String newProfileName = parseProfileName(line);
                boolean atNewProfileStartingLine = newProfileName != null;

                if (atNewProfileStartingLine) {
                    if (currentProfileName != null) {
                        onProfileEndingLine(currentProfileName);
                    }
                    onProfileStartingLine(newProfileName, line);

                    // Start the new profile
                    currentProfileName = newProfileName;
                } else {
                    // Parse the property line
                    Entry<String, String> property = parsePropertyLine(line);

                    if (currentProfileName == null) {
                        throw new IllegalArgumentException(
                                "Property is defined without a preceding profile name. "
                                + "Current line: " + line);
                    }

                    onProfileProperty(currentProfileName,
                                      property.getKey(),
                                      property.getValue(),
                                      isSupportedProperty(property.getKey()),
                                      line);
                }
            }

            // EOF
            if (currentProfileName != null) {
                onProfileEndingLine(currentProfileName);
            }

            onEndOfFile();

        } finally {
            scanner.close();
        }
    }
1099584
public void setFields(DBFField[] fields) {
		if (this.closed) {
			throw new IllegalStateException("You can not set fields to a closed DBFWriter");
		}
		if (this.header.fieldArray != null) {
			throw new DBFException("Fields has already been set");
		}
		if (fields == null || fields.length == 0) {
			throw new DBFException("Should have at least one field");
		}
		for (int i = 0; i < fields.length; i++) {
			if (fields[i] == null) {
				throw new DBFException("Field " + i + " is null");
			}
		}
		this.header.fieldArray = new DBFField[fields.length];
		for (int i = 0; i < fields.length; i++) {
			this.header.fieldArray[i] = new DBFField(fields[i]);
		}
		try {
			if (this.raf != null && this.raf.length() == 0) {
				// this is a new/non-existent file. So write header before proceeding
				this.header.write(this.raf);
			}
		} catch (IOException e) {
			throw new DBFException("Error accesing file:" + e.getMessage(), e);
		}
	}
815283
protected void appendFieldStart(StringBuilder buffer, String fieldName) {
        if (useFieldNames && fieldName != null) {
            buffer.append(fieldName);
            buffer.append(fieldNameValueSeparator);
        }
    }
831677
public static void doWithLocalFields(Class<?> clazz, FieldCallback fc) {
		for (Field field : getDeclaredFields(clazz)) {
			try {
				fc.doWith(field);
			}
			catch (IllegalAccessException ex) {
				throw new IllegalStateException("Not allowed to access field '" + field.getName() + "': " + ex);
			}
		}
	}
786316
private void visit(final ObjectGraphNode currentNode) {
		Object currentValue = currentNode.getValue();

		if (currentValue == null
				|| (currentValue instanceof java.lang.ref.SoftReference)
				|| currentNode.isPrimitive() || currentNode.isSimpleType()) {
			return;
		}

		if (isObjectVisited(currentNode)) {
			ObjectGraphNode ref = visitedNodes.get(currentValue);
			currentNode.setRefNode(ref);
			return;
		}

		markObjectVisited(currentNode);

		if (currentValue instanceof List) {
			// ArrayList's elementData is marked transient, and others may be as well, so we have to do this ourselves.
			visitList(currentNode);
		} else if (currentValue instanceof Map) {
			// HashMap's table is marked transient, and others may be as well, so we have to do this ourselves.
			visitMap(currentNode);
		} else if (currentValue instanceof ComponentModel) {
			// Special case for ComponentModel, so we can figure out if any fields are overridden
			visitComponentModel(currentNode);
		} else if (currentValue instanceof Field) {
			visitComplexType(currentNode);
			summariseNode(currentNode);
		} else if (currentValue.getClass().isArray()) {
			visitArray(currentNode);
		} else {
			visitComplexType(currentNode);
		}
	}
452363
private void resolveFields() {
        // resolve ChronoField
        resolveInstantFields();
        resolveDateFields();
        resolveTimeFields();

        // if any other fields, handle them
        // any lenient date resolution should return epoch-day
        if (fieldValues.size() > 0) {
            int changedCount = 0;
            outer:
            while (changedCount < 50) {
                for (Map.Entry<TemporalField, Long> entry : fieldValues.entrySet()) {
                    TemporalField targetField = entry.getKey();
                    TemporalAccessor resolvedObject = targetField.resolve(fieldValues, this, resolverStyle);
                    if (resolvedObject != null) {
                        if (resolvedObject instanceof ChronoZonedDateTime) {
                            ChronoZonedDateTime<?> czdt = (ChronoZonedDateTime<?>) resolvedObject;
                            if (zone == null) {
                                zone = czdt.getZone();
                            } else if (zone.equals(czdt.getZone()) == false) {
                                throw new DateTimeException("ChronoZonedDateTime must use the effective parsed zone: " + zone);
                            }
                            resolvedObject = czdt.toLocalDateTime();
                        }
                        if (resolvedObject instanceof ChronoLocalDateTime) {
                            ChronoLocalDateTime<?> cldt = (ChronoLocalDateTime<?>) resolvedObject;
                            updateCheckConflict(cldt.toLocalTime(), Period.ZERO);
                            updateCheckConflict(cldt.toLocalDate());
                            changedCount++;
                            continue outer;  // have to restart to avoid concurrent modification
                        }
                        if (resolvedObject instanceof ChronoLocalDate) {
                            updateCheckConflict((ChronoLocalDate) resolvedObject);
                            changedCount++;
                            continue outer;  // have to restart to avoid concurrent modification
                        }
                        if (resolvedObject instanceof LocalTime) {
                            updateCheckConflict((LocalTime) resolvedObject, Period.ZERO);
                            changedCount++;
                            continue outer;  // have to restart to avoid concurrent modification
                        }
                        throw new DateTimeException("Method resolve() can only return ChronoZonedDateTime, " +
                                "ChronoLocalDateTime, ChronoLocalDate or LocalTime");
                    } else if (fieldValues.containsKey(targetField) == false) {
                        changedCount++;
                        continue outer;  // have to restart to avoid concurrent modification
                    }
                }
                break;
            }
            if (changedCount == 50) {  // catch infinite loops
                throw new DateTimeException("One of the parsed fields has an incorrectly implemented resolve method");
            }
            // if something changed then have to redo ChronoField resolve
            if (changedCount > 0) {
                resolveInstantFields();
                resolveDateFields();
                resolveTimeFields();
            }
        }
    }
69171
public void readFields(ArrayList<String> fields) throws IOException {
		fields.clear();
		if (this.eof) {
			throw new EOFException();
		}
		do {
			fields.add(readField());
		} while (this.moreFieldsOnLine);
	}
1285560
public function format_date($field)
    {
        if (!$this->current_row[$field]) {
            $this->current_row[$field] = '-';
        } else {
            if (is_object($this->current_row[$field])) {
                $this->current_row[$field] = $this->current_row[$field]->format(
                    $this->app->getConfig('locale/date', 'd/m/Y')
                );

            } else {
                $this->current_row[$field] = date(
                    $this->app->getConfig('locale/date', 'd/m/Y'),
                    strtotime($this->current_row[$field])
                );
            }
        }
    }
1099424
protected void cleanupCurrentRecord() throws IOException {
        if (this.currentRecord != null) {
            this.currentRecord.close();
            gotoEOR(this.currentRecord);
            this.currentRecord = null;
        }
    }
97758
FieldRef getCurrentCalleeField() {
    FieldRef local = currentCalleeField;
    if (local == null) {
      local =
          currentCalleeField =
              FieldRef.createField(owner, CURRENT_CALLEE_FIELD, CompiledTemplate.class);
    }
    return local;
  }
142349
@Override
    public boolean updateValuesForField(String currentValue) {
        boolean bUpdated = false;
        bUpdated |= updateLinkRemoveValues();
        bUpdated |= updateLinkAddValues();
        return bUpdated;
    }
1339636
private static String forEachFields(final Set<String> fields, OnFieldListener listener) {
		StringBuilder builder = new StringBuilder();
		{
			String comma = "";
			for (String item : fields) {
				builder.append(comma + listener.onField(item));
				comma = ", ";
			}
		}

		return builder.toString();
	}
924096
protected void copyFields() {
        for(Field field: copied_fields) {
            Object value=Util.getField(field,main_channel);
            Util.setField(field, this, value);
        }
    }
680585
public static void print(final UnknownFieldSet fields,
                           final Appendable output)
                           throws IOException {
    DEFAULT_PRINTER.printUnknownFields(fields, new TextGenerator(output));
  }
275069
public void moveFieldToThin(FieldInfo fieldInfo, BaseField field, Record record)
    {
        if ((field == null) || (!field.getFieldName().equals(fieldInfo.getFieldName())))
        {
            field = null;
            if (record != null)
                field = record.getField(fieldInfo.getFieldName());
        }
        if (field != null)
        {
            if (field.getDataClass() == fieldInfo.getDataClass())
                fieldInfo.setData(field.getData());
            else
                fieldInfo.setString(field.toString());
        }
    }