/** * Default Constructor. * * @param name * The name of the condition * @param hint * A hint why the condition failed * @param method * The actual backing implementation of the condition method * @throws RuleDefinitionException * If the {@link ConditionMethod} is invalid. A condition method must be public, * with zero arguments and boolean/Boolean return type. */ public ConditionMethod(String name, String hint, Method method) throws RuleDefinitionException { this.method = checkNotNull(method); this.name = StringUtils.defaultIfEmpty(name, this.method.getName()); this.hint = hint; validate(); }