// cast is ok, since we are dealing with engine internal classes
NodeImpl elem = (NodeImpl) propertyIter.next();
Object newValue = value;
BeanMetaData<?> metaData = beanMetaDataManager.getBeanMetaData( clazz );
PropertyMetaData property = metaData.getMetaDataFor( elem.getName() );
// use precomputed method list as ReflectionHelper#containsMember is slow
if ( property == null ) {
throw log.getInvalidPropertyPathException( elem.getName(), metaData.getBeanClass().getName() );
}
else if ( !propertyIter.hasNext() ) {
metaConstraintsList.addAll( property.getConstraints() );
}
else {
if ( property.isCascading() ) {
Type type = property.getType();
newValue = newValue == null ? null : getValue( newValue, property );
if ( elem.isIterable() ) {
if ( newValue != null && elem.getIndex() != null ) {
newValue = ReflectionHelper.getIndexedValue( newValue, elem.getIndex() );
}