private void addFieldType(String fieldName, Class<?> fieldType) {
            final Class<?> existingType = fieldTypes.get(fieldName);
            if (existingType != null) {
                if (existingType != fieldType) {
                    throw new IllegalStateException("Invalid component definition, field " + fieldName + " uses different value types");
                }
            } else {
                fieldTypes.put(fieldName, fieldType);
            }
        }