|
| 1 | +2023-05-21 23:54:58.724 TRACE_ID DEBUG main Generator4MethodAccessor package com.sparrow.accessMethod; |
| 2 | +import com.sparrow.cg.MethodAccessor; |
| 3 | +import java.util.HashMap; |
| 4 | +import java.util.Map; |
| 5 | +import java.util.function.BiConsumer; |
| 6 | +import java.util.function.BiFunction; |
| 7 | + |
| 8 | + public class HelloEventMethodAccess implements MethodAccessor{ |
| 9 | +private static Map<String, BiFunction<com.sparrow.rocketmq.protocol.event.HelloEvent, String, Object>> getMap = new HashMap<>(); |
| 10 | + private static Map<String, BiConsumer<com.sparrow.rocketmq.protocol.event.HelloEvent, Object>> setMap = new HashMap<>(); |
| 11 | + |
| 12 | +static { |
| 13 | + |
| 14 | +getMap.put("message", (o, r) -> o.getMessage()); |
| 15 | + |
| 16 | + |
| 17 | +setMap.put("message", (o, arg) -> o.setMessage((java.lang.String) arg)); |
| 18 | + |
| 19 | +} |
| 20 | +public Object get(Object o, String methodName){ |
| 21 | +com.sparrow.rocketmq.protocol.event.HelloEvent helloEvent=(com.sparrow.rocketmq.protocol.event.HelloEvent)o;return getMap.get(methodName).apply(helloEvent,methodName);} |
| 22 | +public void set(Object o, String methodName,Object arg){ |
| 23 | +com.sparrow.rocketmq.protocol.event.HelloEvent helloEvent=(com.sparrow.rocketmq.protocol.event.HelloEvent)o; |
| 24 | + setMap.get(methodName).accept(helloEvent,arg);} |
| 25 | +} |
| 26 | +2023-05-21 23:54:59.954 TRACE_ID DEBUG main Generator4MethodAccessor package com.sparrow.accessMethod; |
| 27 | +import com.sparrow.cg.MethodAccessor; |
| 28 | +import java.util.HashMap; |
| 29 | +import java.util.Map; |
| 30 | +import java.util.function.BiConsumer; |
| 31 | +import java.util.function.BiFunction; |
| 32 | + |
| 33 | + public class SourceMethodAccess implements MethodAccessor{ |
| 34 | +private static Map<String, BiFunction<com.sparrow.facade.beans.Source, String, Object>> getMap = new HashMap<>(); |
| 35 | + private static Map<String, BiConsumer<com.sparrow.facade.beans.Source, Object>> setMap = new HashMap<>(); |
| 36 | + |
| 37 | +static { |
| 38 | + |
| 39 | +getMap.put("userId", (o, r) -> o.getUserId()); |
| 40 | + |
| 41 | +getMap.put("birthday", (o, r) -> o.getBirthday()); |
| 42 | + |
| 43 | +getMap.put("age", (o, r) -> o.getAge()); |
| 44 | + |
| 45 | +getMap.put("sb", (o, r) -> o.getSb()); |
| 46 | + |
| 47 | +getMap.put("money", (o, r) -> o.getMoney()); |
| 48 | + |
| 49 | +getMap.put("name", (o, r) -> o.getName()); |
| 50 | + |
| 51 | + |
| 52 | +setMap.put("userId", (o, arg) -> o.setUserId((java.lang.Long) arg)); |
| 53 | + |
| 54 | +setMap.put("birthday", (o, arg) -> o.setBirthday((java.util.Date) arg)); |
| 55 | + |
| 56 | +setMap.put("age", (o, arg) -> o.setAge((java.lang.Integer) arg)); |
| 57 | + |
| 58 | +setMap.put("sb", (o, arg) -> o.setSb((java.lang.Boolean) arg)); |
| 59 | + |
| 60 | +setMap.put("money", (o, arg) -> o.setMoney((java.math.BigDecimal) arg)); |
| 61 | + |
| 62 | +setMap.put("name", (o, arg) -> o.setName((java.lang.String) arg)); |
| 63 | + |
| 64 | +} |
| 65 | +public Object get(Object o, String methodName){ |
| 66 | +com.sparrow.facade.beans.Source source=(com.sparrow.facade.beans.Source)o;return getMap.get(methodName).apply(source,methodName);} |
| 67 | +public void set(Object o, String methodName,Object arg){ |
| 68 | +com.sparrow.facade.beans.Source source=(com.sparrow.facade.beans.Source)o; |
| 69 | + setMap.get(methodName).accept(source,arg);} |
| 70 | +} |
| 71 | +2023-05-21 23:55:00.521 TRACE_ID DEBUG main Generator4MethodAccessor package com.sparrow.accessMethod; |
| 72 | +import com.sparrow.cg.MethodAccessor; |
| 73 | +import java.util.HashMap; |
| 74 | +import java.util.Map; |
| 75 | +import java.util.function.BiConsumer; |
| 76 | +import java.util.function.BiFunction; |
| 77 | + |
| 78 | + public class TargetMethodAccess implements MethodAccessor{ |
| 79 | +private static Map<String, BiFunction<com.sparrow.facade.beans.Target, String, Object>> getMap = new HashMap<>(); |
| 80 | + private static Map<String, BiConsumer<com.sparrow.facade.beans.Target, Object>> setMap = new HashMap<>(); |
| 81 | + |
| 82 | +static { |
| 83 | + |
| 84 | +getMap.put("userId", (o, r) -> o.getUserId()); |
| 85 | + |
| 86 | +getMap.put("birthday", (o, r) -> o.getBirthday()); |
| 87 | + |
| 88 | +getMap.put("age", (o, r) -> o.getAge()); |
| 89 | + |
| 90 | +getMap.put("sb", (o, r) -> o.getSb()); |
| 91 | + |
| 92 | +getMap.put("money", (o, r) -> o.getMoney()); |
| 93 | + |
| 94 | +getMap.put("name", (o, r) -> o.getName()); |
| 95 | + |
| 96 | + |
| 97 | +setMap.put("userId", (o, arg) -> o.setUserId((java.lang.Long) arg)); |
| 98 | + |
| 99 | +setMap.put("birthday", (o, arg) -> o.setBirthday((java.util.Date) arg)); |
| 100 | + |
| 101 | +setMap.put("age", (o, arg) -> o.setAge((java.lang.Integer) arg)); |
| 102 | + |
| 103 | +setMap.put("sb", (o, arg) -> o.setSb((java.lang.Boolean) arg)); |
| 104 | + |
| 105 | +setMap.put("money", (o, arg) -> o.setMoney((java.math.BigDecimal) arg)); |
| 106 | + |
| 107 | +setMap.put("name", (o, arg) -> o.setName((java.lang.String) arg)); |
| 108 | + |
| 109 | +} |
| 110 | +public Object get(Object o, String methodName){ |
| 111 | +com.sparrow.facade.beans.Target target=(com.sparrow.facade.beans.Target)o;return getMap.get(methodName).apply(target,methodName);} |
| 112 | +public void set(Object o, String methodName,Object arg){ |
| 113 | +com.sparrow.facade.beans.Target target=(com.sparrow.facade.beans.Target)o; |
| 114 | + setMap.get(methodName).accept(target,arg);} |
| 115 | +} |
| 116 | +2023-05-21 23:55:00.894 TRACE_ID DEBUG main Generator4MethodAccessor package com.sparrow.accessMethod; |
| 117 | +import com.sparrow.cg.MethodAccessor; |
| 118 | +import java.util.HashMap; |
| 119 | +import java.util.Map; |
| 120 | +import java.util.function.BiConsumer; |
| 121 | +import java.util.function.BiFunction; |
| 122 | + |
| 123 | + public class UserMethodAccess implements MethodAccessor{ |
| 124 | +private static Map<String, BiFunction<com.sparrow.json.User, String, Object>> getMap = new HashMap<>(); |
| 125 | + private static Map<String, BiConsumer<com.sparrow.json.User, Object>> setMap = new HashMap<>(); |
| 126 | + |
| 127 | +static { |
| 128 | + |
| 129 | +getMap.put("extend", (o, r) -> o.getExtend()); |
| 130 | + |
| 131 | +getMap.put("userId", (o, r) -> o.getUserId()); |
| 132 | + |
| 133 | +getMap.put("parent", (o, r) -> o.getParent()); |
| 134 | + |
| 135 | +getMap.put("userName", (o, r) -> o.getUserName()); |
| 136 | + |
| 137 | + |
| 138 | +setMap.put("userName", (o, arg) -> o.setUserName((java.lang.String) arg)); |
| 139 | + |
| 140 | +setMap.put("extend", (o, arg) -> o.setExtend((java.util.Map) arg)); |
| 141 | + |
| 142 | +setMap.put("userId", (o, arg) -> o.setUserId((java.lang.String) arg)); |
| 143 | + |
| 144 | +setMap.put("parent", (o, arg) -> o.setParent((com.sparrow.json.User) arg)); |
| 145 | + |
| 146 | +} |
| 147 | +public Object get(Object o, String methodName){ |
| 148 | +com.sparrow.json.User user=(com.sparrow.json.User)o;return getMap.get(methodName).apply(user,methodName);} |
| 149 | +public void set(Object o, String methodName,Object arg){ |
| 150 | +com.sparrow.json.User user=(com.sparrow.json.User)o; |
| 151 | + setMap.get(methodName).accept(user,arg);} |
| 152 | +} |
| 153 | +2023-05-21 23:55:02.999 TRACE_ID DEBUG main Generator4MethodAccessor package com.sparrow.accessMethod; |
| 154 | +import com.sparrow.cg.MethodAccessor; |
| 155 | +import java.util.HashMap; |
| 156 | +import java.util.Map; |
| 157 | +import java.util.function.BiConsumer; |
| 158 | +import java.util.function.BiFunction; |
| 159 | + |
| 160 | + public class User3MethodAccess implements MethodAccessor{ |
| 161 | +private static Map<String, BiFunction<com.sparrow.cg.User3, String, Object>> getMap = new HashMap<>(); |
| 162 | + private static Map<String, BiConsumer<com.sparrow.cg.User3, Object>> setMap = new HashMap<>(); |
| 163 | + |
| 164 | +static { |
| 165 | + |
| 166 | +getMap.put("user", (o, r) -> o.getUser()); |
| 167 | + |
| 168 | + |
| 169 | +setMap.put("user", (o, arg) -> o.setUser((java.lang.String) arg)); |
| 170 | + |
| 171 | +} |
| 172 | +public Object get(Object o, String methodName){ |
| 173 | +com.sparrow.cg.User3 user3=(com.sparrow.cg.User3)o;return getMap.get(methodName).apply(user3,methodName);} |
| 174 | +public void set(Object o, String methodName,Object arg){ |
| 175 | +com.sparrow.cg.User3 user3=(com.sparrow.cg.User3)o; |
| 176 | + setMap.get(methodName).accept(user3,arg);} |
| 177 | +} |
0 commit comments