MCPcopy Create free account
hub / github.com/castello/spring_basic / main

Method main

ch2/SetterCall.java:12–23  ·  view source on GitHub ↗
(String[] args)

Source from the content-addressed store, hash-verified

10
11public class SetterCall {
12 public static void main(String[] args) throws Exception{
13 Map<String, String> map = new HashMap<>();
14 map.put("year", "2021");
15 map.put("month", "10");
16 map.put("day", "1");
17
18 Class<?> type = Class.forName("com.fastcampus.ch2.MyDate");
19
20 // MyDate인스턴스를 생성하고, map의 값으로 초기화한다.
21 Object obj = dataBind(map, type);
22 System.out.println("obj="+obj); // obj=[year=2021, month=10, day=1]
23 } // main
24
25 private static Object dataBind(Map<String, String> map, Class<?> clazz) throws Exception {
26 // 1. MyDate인스턴스 생성

Callers

nothing calls this directly

Calls 1

dataBindMethod · 0.95

Tested by

no test coverage detected