根据字段类型解析对象之并构建属性

@param fieldType 字段类型
@param name 属性配置名称
@param value 属性配置值

@return 属性配置信息
964524
protected AttributeConfig parseAttributeValue(String fieldType, String name, Object value) {
		value = parseValue(fieldType, value);
		if (value != null) {
			AttributeConfig attributeConfig = new AttributeConfig();
			attributeConfig.setName(name);
			attributeConfig.setValue(value.toString());
			return attributeConfig;
		}
		return null;
	}
50471
public static void setFieldValue(final Object object, final String fieldName, final Object value) {

        final boolean success = new DerivedClassIterator(object.getClass()) {

            @Override
            protected boolean handleClass(final Class<?> clazz) {
                try {
                    setFieldValue(object, clazz, fieldName, value);
                    return true;
                } catch (final NoSuchFieldException e) {
                    LOG.debug("could not set field " + fieldName + " value " + value, e);

                }
                return false;
            }
        }.iterate();

        if (!success) {
            LOG.warn("could not set field " + fieldName + " value " + value);
        }
    }
755507
public Field getField(String name) {
    if (fieldMap == null) {
      return null;
    }
    return fieldMap.get(name);
  }
913733
def find_field_by_value(browser, field_type, name):
    
    xpath = field_xpath(field_type, 'value') % string_literal(name)
    elems = ElementSelector(
        browser,
        xpath=str(xpath),
        filter_displayed=True,
        filter_enabled=True,
    )

    # sort by shortest first (most closely matching)
    if field_type in ('button-element', 'button-role'):
        elems = sorted(elems, key=lambda elem: len(elem.text))
    else:
        elems = sorted(elems,
                       key=lambda elem: len(elem.get_attribute('value')))

    if elems:
        elems = [elems[0]]

    return ElementSelector(browser, elements=elems)
1021025
public boolean isSameType(FieldInfo field)
    { // Copy this data to a field  //Change this to lock the objects down first!
        boolean bSameType = false;
        if (this.getClass().getName().equals(field.getClass().getName()))
            bSameType = true;
        else
        {
            Object data = this.getData();
            Class<?> classData = this.getDataClass();
            if (data != null)
                classData = data.getClass();
            Object fieldData = field.getData();
            Class<?> classField = field.getDataClass();
            if (fieldData != null)
                classField = fieldData.getClass();
            if (classData.equals(classField))
                bSameType = true;
        }
        return bSameType;
    }
1342007
public JavaField getField(String name)
  {
    ArrayList<JavaField> fieldList = getFieldList();
    
    for (int i = 0; i < fieldList.size(); i++) {
      JavaField field = fieldList.get(i);

      if (field.getName().equals(name))
        return field;
    }

    return null;
  }
315746
public static <T> FieldValue<T> from(String name, Field<T> field, T defaultValue) {
        return new FieldValue<T>(name, field, defaultValue);
    }
858892
public void setCustomFieldValue(String fieldNameOrApiId, String value) {
        CustomField f = new CustomField();
        f.setName(fieldNameOrApiId);
        f.setValue(value);
        customFields.add(f);
    }
572301
public static FieldDataTermsQueryBuilder fieldDataTermsQuery(String name, byte[] value, int cacheKey) {
    return new FieldDataTermsQueryBuilder(name, value, cacheKey);
  }
174409
public static Field getFieldForColumn(String name,ColumnType columnType) {
        switch(columnType) {
            case Long: return field(name,new ArrowType.Int(64,false));
            case Integer: return field(name,new ArrowType.Int(32,false));
            case Double: return field(name,new ArrowType.FloatingPoint(FloatingPointPrecision.DOUBLE));
            case Float: return field(name,new ArrowType.FloatingPoint(FloatingPointPrecision.SINGLE));
            case Boolean: return field(name, new ArrowType.Bool());
            case Categorical: return field(name,new ArrowType.Utf8());
            case Time: return field(name,new ArrowType.Date(DateUnit.MILLISECOND));
            case Bytes: return field(name,new ArrowType.Binary());
            case NDArray: return field(name,new ArrowType.Binary());
            case String: return field(name,new ArrowType.Utf8());

            default: throw new IllegalArgumentException("Column type invalid " + columnType);
        }
    }
701817
public FieldValue lookup(FieldName name){
		Map<FieldName, FieldValue> values = getValues();

		FieldValue value = values.getOrDefault(name, EvaluationContext.UNDECLARED_VALUE);
		if(value != EvaluationContext.UNDECLARED_VALUE){
			return value;
		}

		throw new MissingValueException(name);
	}
1086852
public static String getMapFieldType(Field field) {
        String k = getMapFieldKeyType(field);
        String v = getMapFieldValueType(field);
        return "java.util.Map<" + k + ", " + v + ">";
    }
1347731
public void setFieldValue(String fieldName, Object value) {
		DOField field = this.domainObjectType.getFieldByName(fieldName);
		if (field == null)
			throw new RuntimeException("field: " + fieldName + " not found in: " + this.domainObjectType.getName());
		if (field.getComponentTypeName() != null)
			throw new RuntimeException("field: " + fieldName + " is a list field, use list field accessors instead ");
		Object val = value;
		if (value instanceof DomainObject)
			val = ((DomainObject)value).getRawObject();
		field.setValue(this.getRawObject(), val);
	}
191501
public static Field field(String name,ArrowType arrowType) {
        return new Field(name,FieldType.nullable(arrowType), new ArrayList<Field>());
    }
456602
public TResult queryForEq(String fieldName, Object value) {
		return queryForEq(fieldName, value, null, null, null);
	}
227428
public String getFieldValue(String name) {
        String field = (String)fields.get(name);
        if (field == null) {
            return null;
        }
        else {
        	return field;
        }
    }
359756
public static <T extends FieldDescription> ElementMatcher.Junction<T> fieldType(TypeDescription fieldType) {
        return fieldType(is(fieldType));
    }