Called from Format after creating a FieldDelegate
963601
private StringBuffer format(Date date, StringBuffer toAppendTo,
                                FieldDelegate delegate) {
        // Convert input date to time field list
        calendar.setTime(date);

        boolean useDateFormatSymbols = useDateFormatSymbols();

        for (int i = 0; i < compiledPattern.length; ) {
            int tag = compiledPattern[i] >>> 8;
            int count = compiledPattern[i++] & 0xff;
            if (count == 255) {
                count = compiledPattern[i++] << 16;
                count |= compiledPattern[i++];
            }

            switch (tag) {
            case TAG_QUOTE_ASCII_CHAR:
                toAppendTo.append((char)count);
                break;

            case TAG_QUOTE_CHARS:
                toAppendTo.append(compiledPattern, i, count);
                i += count;
                break;

            default:
                subFormat(tag, count, delegate, toAppendTo, useDateFormatSymbols);
                break;
            }
        }
        return toAppendTo;
    }
1160070
function parseField(field, fieldName, model) {
		// parse & check attributes and include
		parseIncludes(field, fieldName, model.name, model);

		// parse & check order
		parseOrders(field, fieldName, model);
	}
1052117
function DelegateField(type, options) {
  Field.call(this, type, options);
  this.options = options;
  this.requisition.onAssignmentChange.add(this.update, this);

  this.element = util.createElement(this.document, 'div');
  this.update();

  this.onFieldChange = util.createEvent('DelegateField.onFieldChange');
}
796833
function (fieldDefinition, fieldName) {
    const fieldType = propertyHelper.getFieldType(fieldDefinition);

    if (fieldType === 'date') {
      // This field is a date field. Create the checks
      return createDateChecks(fieldDefinition, fieldName);
    }
  }
753442
private void processModifiersAndVariablesOfFieldDeclaration( FieldDeclaration fieldDeclaration,
                                                                 FieldMetadata arrayTypeFieldMetadata ) {
        processModifiersOfFieldDeclaration(fieldDeclaration, arrayTypeFieldMetadata);
        processVariablesOfVariableDeclarationFragment(fieldDeclaration, arrayTypeFieldMetadata);
    }
936845
private void storeField(Field field, StructImpl fieldsMap) {
	String fieldName = field.getName();
	Object o = fieldsMap.get(fieldName, null);
	Field[] args;
	if (o == null) {
	    args = new Field[1];
	    fieldsMap.setEL(fieldName, args);
	}
	else {
	    Field[] fs = (Field[]) o;
	    args = new Field[fs.length + 1];
	    for (int i = 0; i < fs.length; i++) {
		fs[i].setAccessible(true);
		args[i] = fs[i];
	    }
	    fieldsMap.setEL(fieldName, args);
	}
	args[args.length - 1] = field;
    }
272086
private void groupFieldtoDoc(UNode                parentNode,
                                 FieldDefinition      groupFieldDef,
                                 Set<FieldDefinition> deferredFields) {
        // Prerequisities:
        assert parentNode != null;
        assert groupFieldDef != null && groupFieldDef.isGroupField();
        assert deferredFields != null && deferredFields.size() > 0;
        
        UNode groupNode = parentNode.addMapNode(groupFieldDef.getName(), "field");
        for (FieldDefinition nestedFieldDef : groupFieldDef.getNestedFields()) {
            if (!deferredFields.contains(nestedFieldDef)) {
                continue;
            }
            if (nestedFieldDef.isGroupField()) {
                groupFieldtoDoc(groupNode, nestedFieldDef, deferredFields);
            } else {
                leafFieldtoDoc(groupNode, nestedFieldDef.getName());
            }
        }
    }
596754
function() {
    var nameField = new Blockly.FieldTextInput(
        Blockly.Msg.PROCEDURES_DEFRETURN_PROCEDURE,
        Blockly.Procedures.rename);
    nameField.setSpellcheck(false);
    this.appendDummyInput()
        .appendField(Blockly.Msg.PROCEDURES_DEFRETURN_TITLE)
        .appendField(nameField, 'NAME')
        .appendField('', 'PARAMS');
    this.appendValueInput('RETURN')
        .setAlign(Blockly.ALIGN_RIGHT)
        .appendField(Blockly.Msg.PROCEDURES_DEFRETURN_RETURN);
    this.setMutator(new Blockly.Mutator(['procedures_mutatorarg']));
    if (Blockly.Msg.PROCEDURES_DEFRETURN_COMMENT) {
      this.setCommentText(Blockly.Msg.PROCEDURES_DEFRETURN_COMMENT);
    }
    this.setColour(Blockly.Blocks.procedures.HUE);
    this.setTooltip(Blockly.Msg.PROCEDURES_DEFRETURN_TOOLTIP);
    this.setHelpUrl(Blockly.Msg.PROCEDURES_DEFRETURN_HELPURL);
    this.arguments_ = [];
    this.setStatements_(true);
    this.statementConnection_ = null;
  }
559392
function(inst) {
		var altFormat, date, dateStr,
			altField = this._get(inst, "altField");

		if (altField) { // update alternate field too
			altFormat = this._get(inst, "altFormat") || this._get(inst, "dateFormat");
			date = this._getDate(inst);
			dateStr = this.formatDate(altFormat, date, this._getFormatConfig(inst));
			$(altField).each(function() { $(this).val(dateStr); });
		}
	}
925210
private void handleField() {
        if (LOG.isDebugEnabled())
            LOG.debug("parsedField:  _fieldName={} _fieldValue={} {}", _fieldName, _fieldValue, this);

        if (_fieldName != null && _fieldValue != null)
            _handler.parsedField(_fieldName, _fieldValue);
        _fieldName = _fieldValue = null;
    }
385829
public void initDelegateDialect(MappedStatement ms) {
        if (delegate == null) {
            if (autoDialect) {
                this.delegate = getDialect(ms);
            } else {
                dialectThreadLocal.set(getDialect(ms));
            }
        }
    }
877783
function createSplitterForField(multiFieldDefinitionPart, fieldName) {

	if (multiFieldDefinitionPart === undefined) {
		throw ("'multiFieldDefinitionPart' must not be undefined");
	}
	if (fieldName === undefined) {
		throw ("'fieldName' must not be undefined");
	}

	const delimiter = multiFieldDefinitionPart.delimiter;
	let escapeChar = multiFieldDefinitionPart.escapeChar;
	let removeWhiteSpace = true;
	let uniqueFields = true;
	let sortFields = true;
	let removeEmpty = true;

	// set default values
	if (multiFieldDefinitionPart.removeWhiteSpace !== undefined) {
		// remove leading and trailing whitespaces
		removeWhiteSpace = multiFieldDefinitionPart.removeWhiteSpace;
	}

	if (multiFieldDefinitionPart.uniqueFields !== undefined) {
		// remove duplicates from the list
		uniqueFields = multiFieldDefinitionPart.uniqueFields;
	}

	if (multiFieldDefinitionPart.sortFields !== undefined) {
		// sort the fields
		sortFields = multiFieldDefinitionPart.sortFields;
	}
	if (multiFieldDefinitionPart.removeEmpty !== undefined) {
		// Empty fields will be deleted
		removeEmpty = multiFieldDefinitionPart.removeEmpty;
	}


	return function (content) {
		if (content.hasOwnProperty(fieldName)) {
			// the field exists in the content record
			let fieldValue = content[fieldName];
			if (fieldValue) {

				// ------------------------------------------------
				// escape delimiter
				// ------------------------------------------------
				if (escapeChar) {
					escapeChar = escapeChar.replace(/\\/, "\\\\");
					escapeChar = escapeChar.replace(/\//, "\\/");

					// The escaped delimiter will be replaced by the string '<--DIVIDER-->'
					let re = new RegExp(escapeChar + delimiter, 'g');
					fieldValue = fieldValue.replace(re, TMP_DEVIDER);
				}

				// ------------------------------------------------
				// split the string
				// ------------------------------------------------
				let values = fieldValue.split(delimiter);

				if (escapeChar) {
					// remove the escape char
					let re = new RegExp(TMP_DEVIDER, 'g');
					for (let i = 0; i < values.length; i++) {
						values[i] = values[i].replace(re, delimiter);
					}
				}


				// ------------------------------------------------
				// remove the leading and trailing whiteSpaces
				// ------------------------------------------------
				if (removeWhiteSpace) {
					for (let i = 0; i < values.length; i++) {
						values[i] = values[i].trim();
					}
				}

				// ------------------------------------------------
				// remove empty fields
				// ------------------------------------------------
				if (removeEmpty) {
					let i = 0;
					let j = 0;
					for (i = 0; i < values.length; i++) {
						if (values[i]) {
							values[j] = values[i];
							j++;
						}
					}
					values.splice(j, i);
				}

				// ------------------------------------------------
				// sort fields
				// ------------------------------------------------
				if (sortFields) {
					values.sort();
				}

				// ------------------------------------------------
				// remove duplicates
				// ------------------------------------------------
				if (uniqueFields) {
					values = values.filter(function (elem, pos) {
						return values.indexOf(elem) == pos;
					});
				}

				// ------------------------------------------------
				// store the splited fields back to the content
				// ------------------------------------------------
				content[fieldName] = values;
			}
		}

		return null;
	};
}
738948
private void parseFieldUpdate(String fieldName, UNode valueNode) {
        if (valueNode.isValue()) {
            addFieldValue(fieldName, valueNode.getValue());
        } else if (valueNode.childrenAreValues()) {
            parseFieldAdd(fieldName, valueNode);
        } else {
            for (UNode childNode : valueNode.getMemberList()) {
                if (childNode.isCollection() && childNode.getName().equals("add") && childNode.childrenAreValues()) {
                    // "add" for an MV field
                    parseFieldAdd(fieldName, childNode);
                } else if (childNode.isCollection() && childNode.getName().equals("remove") && childNode.childrenAreValues()) {
                    // "remove" for an MV field
                    parseFieldRemove(fieldName, childNode);
                } else {
                    parseFieldUpdate(childNode.getName(), childNode);
                }
            }
        }
    }
1211183
def _FormatField(self, field):
    
    if self._FIELD_DELIMITER and isinstance(field, py2to3.STRING_TYPES):
      return field.replace(self._FIELD_DELIMITER, ' ')
    return field
716713
@SuppressWarnings( "unchecked" )
    protected void processModifiersOfFieldDeclaration( FieldDeclaration fieldDeclaration,
                                                       FieldMetadata fieldMetadata ) {
        List<IExtendedModifier> extendedModifiers = fieldDeclaration.modifiers();
        for (IExtendedModifier extendedModifier : extendedModifiers) {
            if (extendedModifier.isAnnotation()) {
                Annotation annotation = (Annotation)extendedModifier;
                fieldMetadata.getAnnotations().add(createAnnotationMetadataFor(annotation));

            } else {
                Modifier modifier = (Modifier)extendedModifier;
                ModifierMetadata modifierMetadata = new ModifierMetadata(modifier.getKeyword().toString());
                fieldMetadata.getModifiers().add(modifierMetadata);
            }
        }

    }
28960
private void processSimpleField(Field field) {
    PropertyMetadata propertyMetadata = IntrospectionUtils.getPropertyMetadata(field);
    if (propertyMetadata != null) {
      metadata.putPropertyMetadata(propertyMetadata);
    }
  }
305415
@Override
	public void generateSpecializedPart(SQLiteModelMethod method, TypeSpec.Builder classBuilder, MethodSpec.Builder methodBuilder, Set<JQLProjection> fieldList, boolean mapFields) {
		//LiteralType listenerType=LiteralType.of(OnReadCursorListener.class);
		ClassName listenerType=ClassName.get(OnReadCursorListener.class);
		
		int counter = SqlBuilderHelper.countParameterOfType(method, listenerType);
		if (counter == 0) {
			// non listener found
			throw (new InvalidMethodSignException(method, "there is no parameter of type \"ReadCursorListener\""));
		}
		if (counter > 1) {
			// more than one listener found
			throw (new InvalidMethodSignException(method, "there are more than one parameter of type \"ReadCursorListener\""));
		}

		String listenerName = SqlSelectBuilder.getNameParameterOfType(method, listenerType);

		methodBuilder.addCode("\n");
		methodBuilder.beginControlFlow("if (_cursor.moveToFirst())");

		// generate index from columns
		methodBuilder.addCode("\n");

		methodBuilder.beginControlFlow("do\n");
		methodBuilder.addCode("$L.onRead(_cursor);\n", listenerName);
		methodBuilder.endControlFlow("while (_cursor.moveToNext())");

		// close cursor
		methodBuilder.endControlFlow();
		methodBuilder.endControlFlow();

	}