/** * {@inheritDoc} */ public void handleProperty(String token) { moveDownIfNecessary(); MetaBean metaBean = validationContext.getMetaBean(); if (metaBean instanceof DynamicMetaBean) { metaBean = metaBean.resolveMetaBean(ObjectUtils.defaultIfNull(validationContext.getBean(), rawType)); validationContext.setMetaBean(metaBean); } MetaProperty mp = metaBean.getProperty(token); if (mp == null) { // TODO this could indicate a property hosted on a superclass; should we shunt the context traversal down a path based on that type? PropertyAccess access = new PropertyAccess(rawType, token); if (access.isKnown()) { // add heretofore unknown, but valid, property on the fly: mp = Jsr303MetaBeanFactory.addMetaProperty(metaBean, access); } else { throw new UnknownPropertyException("unknown property '" + token + "' in " + metaBean.getId()); } } validationContext.setMetaProperty(mp); setType(mp.getType()); }