Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 3 of 3 for convertValue (0.24 sec)

  1. src/test/java/org/codelibs/core/beans/util/CopyOptionsTest.java

            assertThat(new CopyOptions().convertValue(new Integer(1), "aaa", null), is((Object) 1));
        }
    
        /**
         * @throws Exception
         */
        @Test
        public void testConvertValue_propertyConverter_asString() throws Exception {
            assertThat(new CopyOptions().converter(new NumberConverter("##0"), "aaa").convertValue(new Integer(1), "aaa", null),
                    is((Object) "1"));
        }
    Java
    - Registered: Fri May 03 20:58:11 GMT 2024
    - Last Modified: Thu Mar 07 01:59:08 GMT 2024
    - 12K bytes
    - Viewed (0)
  2. src/main/java/org/codelibs/core/beans/util/BeanUtil.java

                }
                final Object value = srcPropertyDesc.getValue(src);
                if (!options.isTargetValue(value)) {
                    continue;
                }
                final Object convertedValue = options.convertValue(value, destPropertyName, destPropertyDesc.getPropertyType());
                destPropertyDesc.setValue(dest, convertedValue);
            }
        }
    
        /**
         * Beanから{@literal Map}にコピーを行います。
         *
    Java
    - Registered: Fri May 03 20:58:11 GMT 2024
    - Last Modified: Thu Mar 07 01:59:08 GMT 2024
    - 21.5K bytes
    - Viewed (0)
  3. src/main/java/org/codelibs/core/beans/util/CopyOptions.java

         *            値
         * @param destPropertyName
         *            コピー先のプロパティ名
         * @param destPropertyClass
         *            コピー先のプロパティクラス
         * @return 変換後の値
         */
        protected Object convertValue(final Object value, final String destPropertyName, final Class<?> destPropertyClass) {
            if (value == null || value.getClass() != String.class && destPropertyClass != null && destPropertyClass != String.class) {
    Java
    - Registered: Fri May 03 20:58:11 GMT 2024
    - Last Modified: Thu Mar 07 01:59:08 GMT 2024
    - 18.6K bytes
    - Viewed (0)
Back to top