String value = String.class.isInstance(bean)
? (String)bean
: ValidatorUtils.getValueAsString(bean, property);
ValidWhenLexer lexer = new ValidWhenLexer(new StringReader(test));
ValidWhenParser parser = new ValidWhenParser(lexer);
parser.setForm(bean);
parser.setIndex(index);
parser.setValue(value);