Instructs the printer to emit a field value as text, and the
parser to expect text.

@param fieldType  type of field to append
@return this DateTimeFormatterBuilder, for chaining
@throws IllegalArgumentException if field type is null
3106
public DateTimeFormatterBuilder appendText(DateTimeFieldType fieldType) {
        if (fieldType == null) {
            throw new IllegalArgumentException("Field type must not be null");
        }
        return append0(new TextField(fieldType, false));
    }
1098654
public AnnotatedTypeBuilder<X> addToField(AnnotatedField<? super X> field, Annotation annotation) {
       return addToField(field.getJavaMember(), annotation);
   }
560623
public static Type toType(String type) throws TransformerException {
	if (type == null) return OBJECT;
	type = type.trim();
	String lcType = StringUtil.toLowerCase(type);
	char first = lcType.charAt(0);

	switch (first) {
	case 'a':
	    if ("any".equals(lcType)) return OBJECT;
	    if ("array".equals(lcType)) return ARRAY;
	    break;
	case 'b':
	    if ("base64".equals(lcType)) return STRING;
	    if ("binary".equals(lcType)) return BYTE_VALUE_ARRAY;
	    if ("bool".equals(lcType) || "boolean".equals(type)) return BOOLEAN_VALUE;
	    if ("boolean".equals(lcType)) return BOOLEAN;
	    if ("byte".equals(type)) return BYTE_VALUE;
	    if ("byte".equals(lcType)) return BYTE;
	    break;
	case 'c':
	    if ("char".equals(lcType)) return CHAR;
	    if ("character".equals(lcType)) return CHARACTER;
	    if ("collection".equals(lcType)) return BYTE_VALUE_ARRAY;
	    if ("component".equals(lcType)) return COMPONENT;
	    if ("class".equals(lcType)) return COMPONENT;
	    break;
	case 'd':
	    if ("date".equals(lcType) || "datetime".equals(lcType)) return DATE_TIME;
	    if ("decimal".equals(lcType)) return STRING;
	    if ("double".equals(type)) return DOUBLE_VALUE;
	    if ("double".equals(lcType)) return DOUBLE;
	    break;
	case 'e':
	    // if("excel".equals(lcType)) return EXCEL;
	    break;
	case 'f':
	    if ("file".equals(lcType)) return FILE;
	    if ("float".equals(type)) return FLOAT_VALUE;
	    if ("float".equals(lcType)) return FLOAT;
	    if ("function".equals(lcType)) return UDF;
	    break;
	case 'i':
	    if ("int".equals(lcType)) return INT_VALUE;
	    else if ("integer".equals(lcType)) return INTEGER;
	    // ext.img else if("image".equals(lcType)) return ImageUtil.getImageType();
	    break;
	case 'j':
	    if ("java.lang.boolean".equals(lcType)) return BOOLEAN;
	    if ("java.lang.byte".equals(lcType)) return BYTE;
	    if ("java.lang.character".equals(lcType)) return CHARACTER;
	    if ("java.lang.short".equals(lcType)) return SHORT;
	    if ("java.lang.integer".equals(lcType)) return INTEGER;
	    if ("java.lang.long".equals(lcType)) return LONG;
	    if ("java.lang.float".equals(lcType)) return FLOAT;
	    if ("java.lang.double".equals(lcType)) return DOUBLE;
	    if ("java.io.file".equals(lcType)) return FILE;
	    if ("java.lang.string".equals(lcType)) return STRING;
	    if ("java.lang.string[]".equals(lcType)) return STRING_ARRAY;
	    if ("java.util.date".equals(lcType)) return DATE;
	    if ("java.lang.object".equals(lcType)) return OBJECT;
	    break;
	case 'l':
	    if ("long".equals(type)) return LONG_VALUE;
	    if ("long".equals(lcType)) return LONG;
	    if ("locale".equals(lcType)) return LOCALE;
	    if ("lucee.runtime.type.Collection$Key".equals(type)) return COLLECTION_KEY;
	    break;
	case 'n':
	    if ("node".equals(lcType)) return NODE;
	    if ("number".equals(lcType)) return DOUBLE_VALUE;
	    if ("numeric".equals(lcType)) return DOUBLE_VALUE;
	    break;
	case 'o':
	    if ("object".equals(lcType)) return OBJECT;
	    break;
	case 'q':
	    if ("query".equals(lcType)) return QUERY;
	    if ("querycolumn".equals(lcType)) return QUERY_COLUMN;
	    break;
	case 's':
	    if ("string".equals(lcType)) return STRING;
	    if ("struct".equals(lcType)) return STRUCT;
	    if ("short".equals(type)) return SHORT_VALUE;
	    if ("short".equals(lcType)) return SHORT;
	    break;
	case 't':
	    if ("timezone".equals(lcType)) return TIMEZONE;
	    if ("timespan".equals(lcType)) return TIMESPAN;
	    break;
	case 'u':
	    if ("udf".equals(lcType)) return UDF;
	    break;
	case 'v':
	    if ("void".equals(lcType)) return VOID;
	    if ("variablestring".equals(lcType)) return STRING;
	    if ("variable_string".equals(lcType)) return STRING;
	    break;
	case 'x':
	    if ("xml".equals(lcType)) return NODE;
	    break;
	case '[':
	    if ("[Ljava.lang.String;".equals(lcType)) return STRING_ARRAY;
	    break;

	}
	// TODO Array als Lbyte und auch byte[]

	try {
	    return Type.getType(ClassUtil.loadClass(type));
	}
	catch (ClassException e) {
	    throw new TransformerException(e, null);
	}
    }
348369
private void checkFieldType(int field, Type... expected)
    {
        Type actual = getType(field);
        for (Type type : expected) {
            if (actual.equals(type)) {
                return;
            }
        }

        throw new IllegalArgumentException(format("Expected field %s to be a type of %s but is %s", field, StringUtils.join(expected, ","), actual));
    }
964057
public ClassBuilder<T> withField(String field, Class<?> fieldClass) {
		fields.put(field, fieldClass);
		return this;
	}
150196
public static <T> Class<FieldParser<T>> getParserForType(Class<T> type) {
		Class<? extends FieldParser<?>> parser = PARSERS.get(type);
		if (parser == null) {
			return null;
		} else {
			@SuppressWarnings("unchecked")
			Class<FieldParser<T>> typedParser = (Class<FieldParser<T>>) parser;
			return typedParser;
		}
	}
103801
public static String getFieldNameByType(Class<?> classType, Class<?> fieldType) {
		Field[] declaredFields = classType.getDeclaredFields();
		for (Field field : declaredFields) {
			if (field.getType().isAssignableFrom(fieldType)) {
				return field.getName();
			}
		}
		if (classType.getSuperclass() != null) {
			return getFieldNameByType(classType.getSuperclass(), fieldType);
		}
		return null;
	}
350554
protected void appendStringType(StringBuilder sb, FieldType fieldType, int fieldWidth) {
		if (isVarcharFieldWidthSupported()) {
			sb.append("VARCHAR(").append(fieldWidth).append(')');
		} else {
			sb.append("VARCHAR");
		}
	}
115935
public static Type forField(Field field) {
		Assert.notNull(field, "Field must not be null");
		return forTypeProvider(new FieldTypeProvider(field));
	}
1161044
private static FieldType getPlaceholder(final Class<?> type, final int fieldID)
   {
      return new FieldType()
      {
         @Override public FieldTypeClass getFieldTypeClass()
         {
            return FieldTypeClass.UNKNOWN;
         }

         @Override public String name()
         {
            return "UNKNOWN";
         }

         @Override public int getValue()
         {
            return fieldID;
         }

         @Override public String getName()
         {
            return "Unknown " + (type == null ? "" : type.getSimpleName() + "(" + fieldID + ")");
         }

         @Override public String getName(Locale locale)
         {
            return getName();
         }

         @Override public DataType getDataType()
         {
            return null;
         }

         @Override public FieldType getUnitsType()
         {
            return null;
         }

         @Override public String toString()
         {
            return getName();
         }
      };
   }
754768
private void assertValidDateFieldType(Optional<Field> field) {

		field.ifPresent(it -> {

			if (SUPPORTED_DATE_TYPES.contains(it.getType().getName())) {
				return;
			}

			Class<?> type = it.getType();

			if (Jsr310Converters.supports(type)
					|| ThreeTenBackPortConverters.supports(type)) {
				return;
			}

			throw new IllegalStateException(String.format(
					"Found created/modified date field with type %s but only %s as well as java.time types are supported!",
					type, SUPPORTED_DATE_TYPES));
		});
	}
919214
@XmlElementDecl(namespace = "http://www.w3.org/2005/Atom", name = "updated", scope = SourceType.class)
    public JAXBElement<DateTimeType> createSourceTypeUpdated(DateTimeType value) {
        return new JAXBElement<DateTimeType>(ENTRY_TYPE_UPDATED_QNAME,
                DateTimeType.class, SourceType.class, value);
    }
874690
private String parseValue(String fieldType, Object value) {
		if (TypeConver.isBasicType(fieldType)) {
			if (value != null) {
				return value.toString();
			} else {
				return null;
			}
		}
		return null;
	}
1333635
public void add(final FieldDescriptor type) {
    if (type.getJavaType() == FieldDescriptor.JavaType.MESSAGE) {
      throw new IllegalArgumentException(
        "ExtensionRegistry.add() must be provided a default instance when " +
        "adding an embedded message extension.");
    }
    add(new ExtensionInfo(type, null));
  }
814385
@SuppressWarnings({"unchecked", "rawtypes"})
  public void setField(final FieldDescriptorType descriptor,
                       Object value) {
    if (descriptor.isRepeated()) {
      if (!(value instanceof List)) {
        throw new IllegalArgumentException(
          "Wrong object type used with protocol message reflection.");
      }

      // Wrap the contents in a new list so that the caller cannot change
      // the list's contents after setting it.
      final List newList = new ArrayList();
      newList.addAll((List) value);
      for (final Object element : newList) {
        verifyType(descriptor.getLiteType(), element);
      }
      value = newList;
    } else {
      verifyType(descriptor.getLiteType(), value);
    }

    if (value instanceof LazyField) {
      hasLazyField = true;
    }
    fields.put(descriptor, value);
  }
178635
public AbstractBuilder getAnnotationTypeFieldsBuilder(
            AnnotationTypeWriter annotationTypeWriter)
    throws Exception {
        return AnnotationTypeFieldBuilder.getInstance(context,
            annotationTypeWriter.getAnnotationTypeDoc(),
            writerFactory.getAnnotationTypeFieldWriter(
                annotationTypeWriter));
    }
1075091
public <T> void registerFormatter(final String fieldPath, final Class<T> requiredType, FieldFormatter<T> formatter) {
        ArgUtils.notEmpty(fieldPath, "fieldPath");
        ArgUtils.notNull(requiredType, "requiredType");
        ArgUtils.notNull(formatter, "formatter");
        
        this.pathMap.put(fieldPath, new FormatterHolder(requiredType, formatter));
        
    }