public void set ( E entity , Object value ) { Object object = entity ; for ( int i = 0 ; i < path ( ) . size ( ) - 1 ; i ++ ) { try { Field field = object . getClass ( ) . getDeclaredField ( path ( ) . get ( i ) ) ; field . setAccessible ( true ) ; object = field . get ( object ) ; } catch ( Exception e ) { throw new UncheckedException ( e ) ; } } try { Field field = object . getClass ( ) . getDeclaredField ( name ) ; field . setAccessible ( true ) ; field . set ( object , value ) ; } catch ( Exception e ) { throw new UncheckedException ( e ) ; } }
Sets the property value which this metamodel property instance represents to the specified entity instance .