public static void setPeopertyValue ( final Object target , final String fieldName , Object value ) { JK . logger . trace ( "setPeopertyValue On class({}) on field ({}) with value ({})" , target , fieldName , value ) ; try { if ( value != null ) { Field field = getFieldByName ( target . getClass ( ) , fieldName ) ; if ( field . getType ( ) . isEnum ( ) ) { Class < ? extends Enum > clas = ( Class ) field . getType ( ) ; value = Enum . valueOf ( clas , value . toString ( ) ) ; JK . logger . debug ( "Field is enum, new value is ({}) for class ({})" , value , value . getClass ( ) ) ; } } PropertyUtils . setNestedProperty ( target , fieldName , value ) ; } catch ( Exception e ) { throw new RuntimeException ( e ) ; } }
Sets the peoperty value .