Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- public void deepcopy(Titel from, Titel to) {
- this._deepcopy(from, to);
- }
- public void _deepcopy(Titel from, Titel to) {
- Map<String, String> gehad = new HashMap();
- List<String> setters = Reflection.getMethods(to, "set", "");
- Iterator var5 = setters.iterator();
- String name;
- while(var5.hasNext()) {
- String s = (String)var5.next();
- name = s.substring(3);
- if (!gehad.containsKey(name) && Reflection.hasMethod(from, "get" + name)) {
- Reflection.methodInvoker(to, "set" + name, new Object[]{Reflection.methodInvoker(from, "get" + name, (Object[])null)});
- gehad.put(name.toLowerCase(), s);
- }
- }
- List<Rubriek> rm = this.ttlmdl.getRubrieken(to.getPresoort());
- for(int i = 0; i < rm.size(); ++i) {
- name = StringUtils.capitalize(((Rubriek)rm.get(i)).getVeldnaam().trim());
- if (name.length() != 0 && !gehad.containsKey(name.toLowerCase()) && Reflection.hasMethod(from, "get" + name)) {
- Reflection.methodInvoker(to, "set" + name, new Object[]{Reflection.methodInvoker(from, "get" + name, (Object[])null)});
- gehad.put(name.toLowerCase(), name);
- }
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement