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

x33g5p2x  于2022-02-01 转载在 其他  
字(1.9k)|赞(0)|评价(0)|浏览(80)

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

ValidatorAction.getMethod介绍

[英]Gets the name of method being called for the validator action.
[中]获取为验证程序操作调用的方法的名称。

代码示例

代码示例来源:origin: struts/struts

/**
 * Creates the JavaScript methods list from the given actions.
 * @param actions A List of ValidatorAction objects.
 * @param stopOnError If true, behaves like released version of struts 1.1
 *        and stops after first error. If false, evaluates all validations.
 * @return JavaScript methods.
 */
private String createMethods(List actions, boolean stopOnError) {
  StringBuffer methods = new StringBuffer();
  final String methodOperator = stopOnError ? " && " : " & ";
  Iterator iter = actions.iterator();
  while (iter.hasNext()) {
    ValidatorAction va = (ValidatorAction) iter.next();
    if (methods.length() > 0) {
      methods.append(methodOperator);
    }
    methods.append(va.getMethod())
        .append("(form)");
  }
  return methods.toString();
}

代码示例来源:origin: org.andromda.cartridges/andromda-jsf-cartridge-components

/**
 * Gets the validator method for the underlying <code>validatorAction</code>.
 *
 * @return the validator method.
 * @throws ClassNotFoundException
 * @throws NoSuchMethodException
 */
private Method getValidatorMethod()
  throws ClassNotFoundException, NoSuchMethodException
{
  Class[] parameterTypes =
    new Class[]
    {
      javax.faces.context.FacesContext.class, Object.class, java.util.Map.class,
      java.util.Collection.class, org.apache.commons.validator.ValidatorAction.class,
      org.apache.commons.validator.Field.class
    };
  return this.getValidatorClass().getMethod(
    this.validatorAction.getMethod(),
    parameterTypes);
}

代码示例来源:origin: org.springmodules/spring-modules-validation

methods = va.getMethod() + "(form)";
} else {
  methods += " && " + va.getMethod() + "(form)";

相关文章