- Sort Score
- Result 10 results
- Languages All
Results 1 - 3 of 3 for copyMapToNewBean (0.07 sec)
-
src/main/java/org/codelibs/core/beans/util/BeanUtil.java
* @param destClass The type of the destination Bean. Must not be {@literal null}. * @return The newly copied {@literal Map}. */ public static <T> T copyMapToNewBean(final Map<String, ? extends Object> src, final Class<T> destClass) { return copyMapToNewBean(src, destClass, DEFAULT_OPTIONS); } /** * Copies the source {@literal Map} to a new instance of the destination Bean and returns it. *
Registered: Fri Sep 05 20:58:11 UTC 2025 - Last Modified: Thu Jul 31 08:16:49 UTC 2025 - 23.5K bytes - Viewed (0) -
src/test/java/org/codelibs/core/beans/util/BeanUtilTest.java
*/ @Test public void testCopy_mapToNewBean() throws Exception { final BeanMap src = new BeanMap(); src.put("aaa", "aaa"); final MyBean dest = BeanUtil.copyMapToNewBean(src, MyBean.class); assertThat(dest.aaa, is("aaa")); } /** * @throws Exception */ @Test public void testCopy_mapToNewMap() throws Exception {
Registered: Fri Sep 05 20:58:11 UTC 2025 - Last Modified: Fri Jun 20 13:40:57 UTC 2025 - 34.5K bytes - Viewed (0) -
README.md
BeanUtil.copyBeanToBean(source, destination, options -> options.exclude("password", "internalId")); // Convert between beans and maps Map<String, Object> map = BeanUtil.copyBeanToNewMap(bean); MyBean newBean = BeanUtil.copyMapToNewBean(map, MyBean.class); ``` ### Type Conversion ```java import org.codelibs.core.convert.*; // Safe type conversions with null handling
Registered: Fri Sep 05 20:58:11 UTC 2025 - Last Modified: Sun Aug 31 02:56:02 UTC 2025 - 12.7K bytes - Viewed (0)