org.apache.commons.validator.Field.getIndexedProperty()方法的使用及代码示例

x33g5p2x  于2022-01-19 转载在 其他  
字(2.9k)|赞(0)|评价(0)|浏览(89)

本文整理了Java中org.apache.commons.validator.Field.getIndexedProperty()方法的一些代码示例,展示了Field.getIndexedProperty()的具体用法。这些代码示例主要来源于Github/Stackoverflow/Maven等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。Field.getIndexedProperty()方法的具体详情如下:
包路径:org.apache.commons.validator.Field
类名称:Field
方法名:getIndexedProperty

Field.getIndexedProperty介绍

[英]Gets the indexed property name of the field. This is the method name that can take an int as a parameter for indexed property value retrieval.
[中]获取字段的索引属性名称。这是可以将int作为索引属性值检索参数的方法名称。

代码示例

代码示例来源:origin: commons-validator/commons-validator

/**
 * Modifies the paramValue array with indexed fields.
 *
 * @param field
 * @param pos
 * @param paramValues
 */
private void handleIndexedField(Field field, int pos, Object[] paramValues)
  throws ValidatorException {
  int beanIndex = this.methodParameterList.indexOf(Validator.BEAN_PARAM);
  int fieldIndex = this.methodParameterList.indexOf(Validator.FIELD_PARAM);
  Object indexedList[] = field.getIndexedProperty(paramValues[beanIndex]);
  // Set current iteration object to the parameter array
  paramValues[beanIndex] = indexedList[pos];
  // Set field clone with the key modified to represent
  // the current field
  Field indexedField = (Field) field.clone();
  indexedField.setKey(
    ValidatorUtils.replace(
      indexedField.getKey(),
      Field.TOKEN_INDEXED,
      "[" + pos + "]"));
  paramValues[fieldIndex] = indexedField;
}

代码示例来源:origin: org.apache.commons/com.springsource.org.apache.commons.validator

/**
 * Modifies the paramValue array with indexed fields.
 *
 * @param field
 * @param pos
 * @param paramValues
 */
private void handleIndexedField(Field field, int pos, Object[] paramValues)
  throws ValidatorException {
  int beanIndex = this.methodParameterList.indexOf(Validator.BEAN_PARAM);
  int fieldIndex = this.methodParameterList.indexOf(Validator.FIELD_PARAM);
  Object indexedList[] = field.getIndexedProperty(paramValues[beanIndex]);
  // Set current iteration object to the parameter array
  paramValues[beanIndex] = indexedList[pos];
  // Set field clone with the key modified to represent
  // the current field
  Field indexedField = (Field) field.clone();
  indexedField.setKey(
    ValidatorUtils.replace(
      indexedField.getKey(),
      Field.TOKEN_INDEXED,
      "[" + pos + "]"));
  paramValues[fieldIndex] = indexedField;
}

代码示例来源:origin: de.knightsoft-net/gwt-commons-validator

/**
 * Modifies the paramValue array with indexed fields.
 *
 * @param field
 * @param pos
 * @param paramValues
 */
private void handleIndexedField(Field field, int pos, Object[] paramValues)
  throws ValidatorException {
  int beanIndex = this.methodParameterList.indexOf(Validator.BEAN_PARAM);
  int fieldIndex = this.methodParameterList.indexOf(Validator.FIELD_PARAM);
  Object indexedList[] = field.getIndexedProperty(paramValues[beanIndex]);
  // Set current iteration object to the parameter array
  paramValues[beanIndex] = indexedList[pos];
  // Set field clone with the key modified to represent
  // the current field
  Field indexedField = (Field) field.clone();
  indexedField.setKey(
    ValidatorUtils.replace(
      indexedField.getKey(),
      Field.TOKEN_INDEXED,
      "[" + pos + "]"));
  paramValues[fieldIndex] = indexedField;
}

相关文章