public static void setProperty ( final Object dst , final String propertyName , final Object value ) { if ( dst == null ) { throw new IllegalArgumentException ( "no destination object specified" ) ; } if ( propertyName == null ) { throw new IllegalArgumentException ( "no property specified" ) ; } Class < ? > clazz = dst . getClass ( ) ; PropertyAccessor accessor = _findAccessor ( clazz , propertyName ) ; //throws ObjectTypeException if ( accessor == null ) { throw new IllegalStateException ( "setter not found: class=" + clazz . getName ( ) + ", property=" + propertyName ) ; } accessor . setProperty ( dst , value ) ; }
Sets the property value of the specified object . If the object has no such property it is notified with an exception .