Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 3 of 3 for ConvertValue (0.1 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"));
        }
    Registered: Fri Nov 01 20:58:10 UTC 2024
    - Last Modified: Thu Mar 07 01:59:08 UTC 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}にコピーを行います。
         *
    Registered: Fri Nov 01 20:58:10 UTC 2024
    - Last Modified: Thu Mar 07 01:59:08 UTC 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) {
    Registered: Fri Nov 01 20:58:10 UTC 2024
    - Last Modified: Thu Mar 07 01:59:08 UTC 2024
    - 18.6K bytes
    - Viewed (0)
Back to top